Re: d_splice_alias() problem.
From: Greg Banks (gnb_at_melbourne.sgi.com)
Date: 05/13/04
- Previous message: kernel: "Error"
- In reply to: Neil Brown: "Re: d_splice_alias() problem."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 13 May 2004 17:15:04 +1000 To: Neil Brown <neilb@cse.unsw.edu.au>
Neil Brown wrote:
>
> > Of course I now have an issue with the misleading name ;-)
>
> Maybe: DCACHE_NOT_KNOWN_TO_BE_CONNECTED.
> Unfortunately the absence of the flags is stronger information that
> it's presence and that makes it hard to name...
;-)
> > What I'm wondering is, do we still need DCACHE_DISCONNECTED at all?
> > Perhaps the uses of it could be replaced with combinations of checks
> > of IS_ROOT() and (d == d->d_sb->s_root) ?
>
> It is still needed.
> Suppose one thread creates a disconnected dentry, and then starts building
> the path from the bottom up.
> When it is half way up another request comes in for the same
> filehandle. The same dentry is found. It is now not IS_ROOT, but
> still DCACHE_DISCONNECTED. Until it is fully connected the second
> request shouldn't proceed, and without the DCACHE_DISCONNECTED flag it
> is expensive to test for connected-ness. !IS_ROOT certainly isn't
> enough.
Sure, IS_ROOT() only tells you whether a dentry is connected to its parent
and to tell if its connected to the fs root you need to traverse all the
parents. But nfsd_acceptable() already does this to do permission checks
in the (default) subtree_check case.
So it seems that what the flag gives you is that when its absent and
nosubtree_check is in effect, you know you can short-circuit the connection
walk. Fair enough.
Greg.
-- Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: kernel: "Error"
- In reply to: Neil Brown: "Re: d_splice_alias() problem."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|