From: Jan Harkes <jaharkes@cs.cmu.edu>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2.4.19pre8][RFC] remove-NFS-close-to-open from VFS (was Re: [PATCHSET] 2.4.19-pre8-jp12)
Date: Mon, 21 Oct 2002 13:07:01 -0400 [thread overview]
Message-ID: <20021021170701.GA19844@ravel.coda.cs.cmu.edu> (raw)
In-Reply-To: <15792.24527.668600.662091@charged.uio.no>
On Fri, Oct 18, 2002 at 09:23:59PM +0200, Trond Myklebust wrote:
> > Ok, it will cost Coda a whole upcall/context switch, but as it
> > is '.' we're talking about it should already be locally
> > cached.
>
> But if all you want to do is read the cache, you'd be better off with
> d_revalidate(dentry,LOOKUP_DOT) / d_revalidate(dentry, LOOKUP_DOTDOT).
> Wouldn't that allow you to drop the upcall+context switch too?
Actually, as long as Coda hasn't received a callback from userspace
indicating that the object has changed, it doesn't even make the getattr
upcall. In fact I would probably end up with coda_dentry_revalidate
calling coda_inode_revalidate in either of these cases. So why not just
use iops->revalidate in the first place.
As far as I can see, d_revalidate should just be used to check whether a
cached directory path might have been changed (i.e. forces a real_lookup).
While iops->revalidate checks the validity of the object.
It also looks like 2.5 doesn't have this patch, so I'm assuming a change
like this will be made to that tree at some point. And I'd rather see a
variant that makes sense and doesn't change existing semantics, even
when it might be less efficient for some filesystems. As long as it
remains definitely correct.
Especially the changed semantics of d_revalidate is what troubles me,
- If I do the test on the object, I might 'reinstantiate' a possibly bad
lookup path in the dcache because we revalidate the 'path' based on
the object's state.
- When I test the path, we return ESTALE whenever the path has changed
due to rename, or on 'volatile objects' (Coda specific, mountpoints,
objects under repair, etc.).
So neither test ends up being correct. But if we use dentry_revalidate
and inode_revalidate in the correct places it is immediately clear
_what_ we're testing, the path leading up to the object or the object
itself.
Jan
prev parent reply other threads:[~2002-10-21 17:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200205162142.AWF00051@netmail.netcologne.de>
[not found] ` <E178TUb-0005Bh-00@the-village.bc.nu>
[not found] ` <20020517034357.GA18449@ravel.coda.cs.cmu.edu>
[not found] ` <Pine.LNX.4.44.0205161105520.5254-100000@alumno.inacap.cl>
2002-10-17 20:38 ` [PATCH 2.4.19pre8][RFC] remove-NFS-close-to-open from VFS (was Re: [PATCHSET] 2.4.19-pre8-jp12) Jan Harkes
2002-10-17 21:48 ` Trond Myklebust
2002-10-17 22:16 ` Jan Harkes
2002-10-17 23:57 ` Trond Myklebust
2002-10-18 16:49 ` Jan Harkes
2002-10-18 17:03 ` Trond Myklebust
2002-10-18 17:12 ` Jan Harkes
2002-10-18 17:41 ` Trond Myklebust
2002-10-18 18:23 ` Jan Harkes
2002-10-18 19:23 ` Trond Myklebust
2002-10-21 17:07 ` Jan Harkes [this message]
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=20021021170701.GA19844@ravel.coda.cs.cmu.edu \
--to=jaharkes@cs.cmu.edu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=trond.myklebust@fys.uio.no \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).