linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Viro <viro@math.psu.edu>
To: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	dzafman@kahuna.cag.cpqcorp.net, linux-kernel@vger.kernel.org
Subject: Re: NFS client llseek
Date: Mon, 17 Dec 2001 13:42:25 -0500 (EST)	[thread overview]
Message-ID: <Pine.GSO.4.21.0112171339180.3992-100000@weyl.math.psu.edu> (raw)
In-Reply-To: <20011217181748.GA15970@cs.cmu.edu>



On Mon, 17 Dec 2001, Jan Harkes wrote:

> On Fri, Dec 14, 2001 at 01:51:36PM +0100, Trond Myklebust wrote:
> > Just one comment: Isn't it easier to do this in generic_file_llseek()
> > itself using inode->i_op->revalidate()? That would make it work for
> > coda and smbfs too...
> 
> Actually, as far as Coda is concerned this only adds overhead. Coda uses
> AFS2 session semantics instead of UNIX semantics, so updates are only
> propagated when a file is closed.
> 
> Adding this to the generic_file_llseek will force an useless but
> expensive upcall (and RPC call to the server) to every seek to check for
> an updated i_size while we already know that the i_size of the file
> won't have to change until it is closed and reopened.
> 
> I guess we're just (mis-)using the revalidate call as a replacement of a
> missing call to i_ops->getattr from sys_stat. So perhaps adding the
> revalidate to the generic_llseek is fine, but I'll just have to get that
> missing getattr call into the tree.

As far as I'm concerned it's not fine.

->getattr() is needed and will be added (patch exists), but the thing
about ->revalidate()...  It's a bloody mess that will need serious
cleanups.  And I'd rather have fewer code paths involved into that
cleanup.

	So please, do it in nfs_lseek() explicitly.  If you want to use
generic_file_lseek() - wonderful, call it from nfs_lseek() after you've
done revalidation.


  reply	other threads:[~2001-12-17 18:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-14  0:51 dzafman
2001-12-14 12:42 ` Trond Myklebust
2001-12-14 12:51 ` Trond Myklebust
2001-12-17 18:18   ` Jan Harkes
2001-12-17 18:42     ` Alexander Viro [this message]
2001-12-17 20:34     ` Trond Myklebust
2001-12-14 20:45 dzafman
2001-12-14 23:13 ` Pedro M. Rodrigues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.21.0112171339180.3992-100000@weyl.math.psu.edu \
    --to=viro@math.psu.edu \
    --cc=dzafman@kahuna.cag.cpqcorp.net \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    --subject='Re: NFS client llseek' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).