login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
July
»
19
Re: [PATCH 22/38] union-mount: Implement union lookup
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Valerie Aurora
Subject:
Re: [PATCH 22/38] union-mount: Implement union lookup
Date: Monday, July 19, 2010 - 2:58 pm
On Tue, Jul 13, 2010 at 12:49:10PM +0800, Ian Kent wrote:
quoted text
> On Tue, Jun 15, 2010 at 11:39:52AM -0700, Valerie Aurora wrote: > > Implement unioned directories, whiteouts, and fallthrus in pathname > > lookup routines. do_lookup() and lookup_hash() call lookup_union() > > after looking up the dentry from the top-level file system. > > lookup_union() is centered around __lookup_hash(), which does cached > > and/or real lookups and revalidates each dentry in the union stack. > > > > XXX - implement negative union cache entries > > > > XXX - What about different permissions on different layers on the same > > directory name? Should complain, fail, test permissions on all > > layers, what? > > --- > > fs/namei.c | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- > > fs/union.c | 94 +++++++++++++++++++++++++++++++++ > > fs/union.h | 7 +++ > > 3 files changed, 271 insertions(+), 1 deletions(-) > > > > diff --git a/fs/namei.c b/fs/namei.c > > index 06aad7e..45be5e5 100644 > > --- a/fs/namei.c > > +++ b/fs/namei.c > > @@ -35,6 +35,7 @@ > > #include <asm/uaccess.h> > > > > #include "internal.h" > > +#include "union.h" > > > > /* [Feb-1997 T. Schoebel-Theuer] > > * Fundamental changes in the pathname lookup mechanisms (namei) > > @@ -722,6 +723,160 @@ static __always_inline void follow_dotdot(struct nameidata *nd) > > follow_mount(&nd->path); > > } > > > > +static struct dentry *__lookup_hash(struct qstr *name, struct dentry *base, > > + struct nameidata *nd); > > + > > +/* > > + * __lookup_union - Given a path from the topmost layer, lookup and > > + * revalidate each dentry in its union stack, building it if necessary > > + * > > + * @nd - nameidata for the parent of @topmost > > + * @name - pathname from this element on > > + * @topmost - path of the topmost matching dentry > > + * > > + * Given the nameidata and the path of the topmost dentry for this > > + * pathname, lookup, revalidate, and build the associated union stack. > > + * @topmost must be either a negative dentry or a directory, and not a > > + * whiteout. > > + * > > + * This function may stomp nd->path with the path of the parent > > + * directory of lower layer, so the caller must save nd->path and > > + * restore it afterwards. You probably want to use lookup_union(), > > + * not __lookup_union(). > > + */ > > + > > +static int __lookup_union(struct nameidata *nd, struct qstr *name, > > + struct path *topmost) > > +{ > > + struct path parent = nd->path; > > + struct path lower, upper; > > + struct union_dir *ud; > > + /* new_ud is the tail of the list of union dirs for this dentry */ > > Should new_ud be next_ud, since there is no new_ud defined?
It's also the head of the list. Good anti-comment, there. Fixed, thanks! -VAL --
unsubscribe notice
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: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 00/38] Union mounts - union stack as linked list
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 01/38] VFS: Comment follow_mount() and friends
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 02/38] VFS: Make lookup_hash() return a struct path
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 03/38] VFS: Add read-only users count to superblock
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 04/38] autofs4: Save autofs trigger's vfsmount in s ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 05/38] whiteout/NFSD: Don't return information abou ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 06/38] whiteout: Add vfs_whiteout() and whiteout in ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 07/38] whiteout: Set S_OPAQUE inode flag when creat ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 08/38] whiteout: Allow removal of a directory with ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 09/38] whiteout: tmpfs whiteout support
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 10/38] whiteout: Split of ext2_append_link() from e ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 11/38] whiteout: ext2 whiteout support
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 12/38] whiteout: jffs2 whiteout support
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 14/38] fallthru: ext2 fallthru support
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 16/38] fallthru: tmpfs fallthru support
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 17/38] union-mount: Union mounts documentation
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 18/38] union-mount: Introduce MNT_UNION and MS_UNIO ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 19/38] union-mount: Introduce union_dir structure a ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 20/38] union-mount: Free union dirs on removal from ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 21/38] union-mount: Support for mounting union moun ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 22/38] union-mount: Implement union lookup
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 23/38] union-mount: Call do_whiteout() on unlink an ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 25/38] VFS: Split inode_permission() and create pat ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 27/38] union-mount: In-kernel file copyup routines
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 28/38] union-mount: Implement union-aware access()/ ...
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 29/38] union-mount: Implement union-aware link()
, Valerie Aurora
, (Tue Jun 15, 11:39 am)
[PATCH 30/38] union-mount: Implement union-aware rename()
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
[PATCH 31/38] union-mount: Implement union-aware writable ...
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
[PATCH 32/38] union-mount: Implement union-aware chown()
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
[PATCH 33/38] union-mount: Implement union-aware truncate()
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
[PATCH 34/38] union-mount: Implement union-aware chmod()/f ...
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
[PATCH 35/38] union-mount: Implement union-aware lchown()
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
[PATCH 36/38] union-mount: Implement union-aware utimensat()
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
[PATCH 37/38] union-mount: Implement union-aware setxattr()
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
[PATCH 38/38] union-mount: Implement union-aware lsetxattr()
, Valerie Aurora
, (Tue Jun 15, 11:40 am)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Tue Jun 15, 9:04 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Valerie Aurora
, (Wed Jun 16, 4:14 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Wed Jun 16, 7:04 pm)
Re: [PATCH 17/38] union-mount: Union mounts documentation
, Alex Riesen
, (Thu Jun 17, 1:01 am)
Re: [PATCH 17/38] union-mount: Union mounts documentation
, Valerie Aurora
, (Thu Jun 17, 11:39 am)
Re: [PATCH 17/38] union-mount: Union mounts documentation
, Alex Riesen
, (Thu Jun 17, 1:32 pm)
Re: [PATCH 17/38] union-mount: Union mounts documentation
, Valerie Aurora
, (Fri Jun 18, 2:06 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Sun Jun 20, 8:39 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Miklos Szeredi
, (Mon Jun 21, 6:06 am)
Re: [PATCH 17/38] union-mount: Union mounts documentation
, Miklos Szeredi
, (Mon Jun 21, 6:14 am)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Mon Jun 21, 6:24 am)
Re: [PATCH 17/38] union-mount: Union mounts documentation
, Valerie Aurora
, (Mon Jun 21, 4:17 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Mon Jun 21, 9:46 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, J. R. Okajima
, (Mon Jun 21, 10:49 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Tue Jun 22, 6:11 am)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Tue Jun 22, 6:23 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, J. R. Okajima
, (Tue Jun 22, 7:07 pm)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Tue Jun 22, 7:37 pm)
Re: [PATCH 17/38] union-mount: Union mounts documentation
, Alex Riesen
, (Wed Jun 23, 1:43 am)
Re: [autofs] [PATCH 04/38] autofs4: Save autofs trigger's ...
, Ian Kent
, (Wed Jun 23, 10:16 pm)
Re: [PATCH 06/38] whiteout: Add vfs_whiteout() and whiteou ...
, Ian Kent
, (Mon Jul 12, 8:52 pm)
Re: [PATCH 07/38] whiteout: Set S_OPAQUE inode flag when c ...
, Ian Kent
, (Mon Jul 12, 9:05 pm)
Re: [PATCH 11/38] whiteout: ext2 whiteout support
, Ian Kent
, (Mon Jul 12, 9:24 pm)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Ian Kent
, (Mon Jul 12, 9:30 pm)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Ian Kent
, (Mon Jul 12, 9:47 pm)
Re: [PATCH 22/38] union-mount: Implement union lookup
, Ian Kent
, (Mon Jul 12, 9:49 pm)
Re: [PATCH 24/38] union-mount: Copy up directory entries o ...
, Ian Kent
, (Mon Jul 12, 9:51 pm)
Re: [PATCH 27/38] union-mount: In-kernel file copyup routines
, Ian Kent
, (Mon Jul 12, 9:56 pm)
Re: [PATCH 06/38] whiteout: Add vfs_whiteout() and whiteou ...
, Valerie Aurora
, (Fri Jul 16, 12:50 pm)
Re: [PATCH 07/38] whiteout: Set S_OPAQUE inode flag when c ...
, Valerie Aurora
, (Fri Jul 16, 1:12 pm)
Re: [PATCH 19/38] union-mount: Introduce union_dir structu ...
, Valerie Aurora
, (Fri Jul 16, 1:51 pm)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Valerie Aurora
, (Fri Jul 16, 2:02 pm)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Valerie Aurora
, (Fri Jul 16, 2:05 pm)
Re: [PATCH 07/38] whiteout: Set S_OPAQUE inode flag when c ...
, Ian Kent
, (Fri Jul 16, 9:14 pm)
Re: [PATCH 22/38] union-mount: Implement union lookup
, Valerie Aurora
, (Mon Jul 19, 2:58 pm)
Re: [PATCH 27/38] union-mount: In-kernel file copyup routines
, Valerie Aurora
, (Mon Jul 19, 3:41 pm)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Ian Kent
, (Mon Jul 19, 8:12 pm)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Miklos Szeredi
, (Wed Aug 4, 7:44 am)
Re: [PATCH 19/38] union-mount: Introduce union_dir structu ...
, Miklos Szeredi
, (Wed Aug 4, 7:51 am)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Miklos Szeredi
, (Wed Aug 4, 7:55 am)
Re: [PATCH 27/38] union-mount: In-kernel file copyup routines
, Miklos Szeredi
, (Wed Aug 4, 8:26 am)
Re: [PATCH 19/38] union-mount: Introduce union_dir structu ...
, Valerie Aurora
, (Wed Aug 4, 12:47 pm)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Valerie Aurora
, (Wed Aug 4, 2:59 pm)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Valerie Aurora
, (Wed Aug 4, 3:48 pm)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Valerie Aurora
, (Wed Aug 4, 9:26 pm)
Re: [PATCH 19/38] union-mount: Introduce union_dir structu ...
, Miklos Szeredi
, (Thu Aug 5, 3:28 am)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Miklos Szeredi
, (Thu Aug 5, 3:34 am)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Miklos Szeredi
, (Thu Aug 5, 3:36 am)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Miklos Szeredi
, (Thu Aug 5, 4:13 am)
Re: [PATCH 27/38] union-mount: In-kernel file copyup routines
, Valerie Aurora
, (Thu Aug 5, 12:54 pm)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Valerie Aurora
, (Thu Aug 5, 4:30 pm)
Re: [PATCH 21/38] union-mount: Support for mounting union ...
, Valerie Aurora
, (Fri Aug 6, 9:33 am)
Re: [PATCH 19/38] union-mount: Introduce union_dir structu ...
, Valerie Aurora
, (Fri Aug 6, 10:09 am)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Valerie Aurora
, (Fri Aug 6, 10:12 am)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Valerie Aurora
, (Fri Aug 6, 10:16 am)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Miklos Szeredi
, (Fri Aug 6, 10:44 am)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Valerie Aurora
, (Tue Aug 17, 3:27 pm)
Re: [PATCH 14/38] fallthru: ext2 fallthru support
, Miklos Szeredi
, (Wed Aug 18, 1:26 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Linus Torvalds
Linux 2.6.34-rc4
David Miller
Re: 'global' rq->clock
Vivek Goyal
Re: perf hw in kexeced kernel broken in tip
git
:
Len Brown
Re: fatal: unable to create '.git/index': File exists
Oliver Hoffmann
git init --bare versus git --bare init
Sam Vilain
Re: RFC: Flat directory for notes, or fan-out? Both!
Erik Mouw
Re: cpio command not found
Andy Parkins
Re: cloning/pulling hooks
linux-netdev
:
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Paulius Zaleckas
Re: [RFC] Patch to option HSO driver to the kernel
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
checkpatch: add check for too short Kconfig descriptions
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
Gilles Chehade
Re: Longest Uptime?
Colocation donated by:
Syndicate