Re: [RFC][PATCHSET v3] non-recursive pathname resolution & RCU symlinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 16 May 2015 15:18:11 +0100 Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:

> On Sat, May 16, 2015 at 06:46:26AM +0100, Al Viro wrote:
> 
> > Dealing with multi-component lookups isn't impossible and might be a good
> > idea, but only if all intermediates are populated.  What information does
> > NFSv4 multi-component lookup give you?  9p one gives an array of FIDs,
> > one per component, and that is best used as multi-component revalidate
> > on hot dcache...
> 
> 	Having reread the RFC...  What's the problem with intermediates?
> Just put GETFH and GETATTR between the LOOKUP for each component in
> the same compound and be done with that - you've got yourself everything
> you might possibly need for populating them.  Confused...

The problem isn't getting intermediates.  The problem is that not having
intermediates confuses the dcache.  When the dcache is just providing a
caching service, and not providing a consistency service, then it shouldn't
let itself get confused.

> 
> 	BTW, I would still very much prefer to allocate a chain of
> dentries in fs/namei.c (yes, marking them "in-lookup"), then gave an
> array of pointers (or beginning and end of the chain, but that can
> be more delicate due to dentry tree topology changes from e.g.
> d_materialize_unique(), aka d_splice_alias() these days).  With
> the requirement being "populate them in root-to-leaves order, do nothing
> for ones that had in-lookup flag already cleared".
> 
> 	Another fun possibility (but that would take somewhat more
> restructuring in fs/namei.c) would be to have (on hot cache) a path
> traced for several components, seeing that they are all on the same
> fs and delaying revalidation for a while.  With bulk revalidate covering
> all the chain when we stumble across .., mountpoint or something we believe
> to be a symlink, or when the chain reaches fs-specified limit.  Said bulk
> revalidate should tell how long a prefix had been OK.  Permission change
> handling would be the painful part here...

This seems to just entrench the approach that the dcache is in control and
you are trying to contort it in some unnecessary way to meet one more need.

In the common case, the rcu_walk version of d_revalidate would be very simple
and batching them isn't going to buy much.  Once you hit a "needs revalidate"
or anything else that trips up rcu_walk, just hand it all to the filesystem
and say "your problem".  If the filesystem wants to continue one step at a
time, that is easy - there are helpers for that.   If the filesystem wants to
send the remainder of the path to the server, it can do that too (being
careful of symlinks and mount points of course).  Just give the filesystem
control for the rare slow path.

NeilBrown

Attachment: pgp48yvChXpfG.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux