Re: [PATCH 1/4] VFS: Add a VFS helper function vfs_remote_path_lookup()

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

 



On Fri, Apr 03, 2009 at 02:09:54AM +0100, Al Viro wrote:
> On Fri, Apr 03, 2009 at 12:18:59AM +0100, Al Viro wrote:
> 
> > Eww...  Let's not.  First of all, the really useful part of nd->root for
> > normal case is that it allows to get ...->fs->root once.  So it's better
> > to *cache* ->fs->root in there.  At which point the flag disappears,
> > since it becomes simply nd->root.mnt != NULL.
> > 
> > The interesting part is keeping refcounting happy.  I'll see how to do
> > that - it's clearly useful on its own.  Hopefully will post later tonight...
> 
> ... and the ugly part is the check in follow_dotdot() - one about crossing
> out of chroot.  Joy...

OK, that's actually doable.
See git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git/ cache-root
for current variant; it's for comments *only* - not for merge.  After that
one we should be able to do a modified variant of e.g. vfs_path_lookup()
that would do
	get_path(root);
	nd->root = root;
instead of
	nd->root.mnt = NULL;
and have lookup with root set to given place without touching current->fs
at all.  Warning: this is completely untested.  Not even "does it boot?",
just a code dump.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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