login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
May
»
18
Re: [RFC][PATCH 8/14] Union-mount lookup
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Bharata B Rao
Subject:
Re: [RFC][PATCH 8/14] Union-mount lookup
Date: Friday, May 18, 2007 - 4:05 am
On Tue, May 15, 2007 at 10:00:45AM -0400, Trond Myklebust wrote:
quoted text
> On Mon, 2007-05-14 at 15:12 +0530, Bharata B Rao wrote: > > From: Jan Blunck <j.blunck@tu-harburg.de> > > Subject: Union-mount lookup > > > > Modifies the vfs lookup routines to work with union mounted directories. > > > > The existing lookup routines generally lookup for a pathname only in the > > topmost or given directory. The changed versions of the lookup routines > > search for the pathname in the entire union mounted stack. Also they have been > > modified to setup the union stack during lookup from dcache cache and from > > real_lookup(). > > > > Signed-off-by: Jan Blunck <j.blunck@tu-harburg.de> > > Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> > > --- > > fs/dcache.c | 16 + > > fs/namei.c | 78 +++++- > > fs/namespace.c | 35 ++ > > fs/union.c | 598 +++++++++++++++++++++++++++++++++++++++++++++++++ > > include/linux/dcache.h | 17 + > > include/linux/namei.h | 4 > > include/linux/union.h | 49 ++++ > > 7 files changed, 786 insertions(+), 11 deletions(-) > > > > --- a/fs/dcache.c > > +++ b/fs/dcache.c > > @@ -1286,7 +1286,7 @@ struct dentry * d_lookup(struct dentry * > > return dentry; > > } > > > > -struct dentry * __d_lookup(struct dentry * parent, struct qstr * name) > > +struct dentry * __d_lookup_single(struct dentry *parent, struct qstr *name) > > { > > unsigned int len = name->len; > > unsigned int hash = name->hash; > > @@ -1371,6 +1371,20 @@ out: > > return dentry; > > } > > > > +struct dentry * d_lookup_single(struct dentry *parent, struct qstr *name) > > +{ > > + struct dentry *dentry; > > + unsigned long seq; > > + > > + do { > > + seq = read_seqbegin(&rename_lock); > > + dentry = __d_lookup_single(parent, name); > > + if (dentry) > > + break; > > + } while (read_seqretry(&rename_lock, seq)); > > + return dentry; > > +} > > + > > /** > > * d_validate - verify dentry provided from insecure source > > * @dentry: The dentry alleged to be valid child of @dparent > > --- a/fs/namei.c > > +++ b/fs/namei.c > > @@ -374,6 +374,33 @@ void release_open_intent(struct nameidat > > } > > > > static inline struct dentry * > > +do_revalidate_single(struct dentry *dentry, struct nameidata *nd) > > +{ > > + int status = dentry->d_op->d_revalidate(dentry, nd); > > + if (unlikely(status <= 0)) { > > d_revalidate() returns a 0 or 1 result, not an error.
Doesn't look like (see the comment below) because this is copied as-is from do_revalidate().
quoted text
> > > + /* > > + * The dentry failed validation. > > + * If d_revalidate returned 0 attempt to invalidate > > + * the dentry otherwise d_revalidate is asking us > > + * to return a fail status. > > + */ > > + if (!status) { > > + if (!d_invalidate(dentry)) { > > + __dput_single(dentry); > > + dentry = NULL; > > + } > > + } else { > > + __dput_single(dentry); > > + dentry = ERR_PTR(status);
Regards, Bharata. -
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:
[RFC][PATCH 0/14] VFS based Union Mount(v1)
, Bharata B Rao
, (Mon May 14, 2:37 am)
[RFC][PATCH 1/14] Add union mount documentation
, Bharata B Rao
, (Mon May 14, 2:38 am)
[RFC][PATCH 2/14] Add a new mount flag (MNT_UNION) for un ...
, Bharata B Rao
, (Mon May 14, 2:39 am)
[RFC][PATCH 3/14] Add the whiteout file type
, Bharata B Rao
, (Mon May 14, 2:39 am)
[RFC][PATCH 4/14] Add config options for union mount
, Bharata B Rao
, (Mon May 14, 2:40 am)
[RFC][PATCH 5/14] Introduce union stack
, Bharata B Rao
, (Mon May 14, 2:40 am)
[RFC][PATCH 6/14] Union-mount dentry reference counting
, Bharata B Rao
, (Mon May 14, 2:41 am)
[RFC][PATCH 7/14] Union-mount mounting
, Bharata B Rao
, (Mon May 14, 2:41 am)
[RFC][PATCH 8/14] Union-mount lookup
, Bharata B Rao
, (Mon May 14, 2:42 am)
[RFC][PATCH 9/14] Union-mount readdir
, Bharata B Rao
, (Mon May 14, 2:42 am)
[RFC][PATCH 10/14] In-kernel file copy between union mount ...
, Bharata B Rao
, (Mon May 14, 2:43 am)
[RFC][PATCH 11/14] VFS whiteout handling
, Bharata B Rao
, (Mon May 14, 2:43 am)
[RFC][PATCH 12/14] ext2 whiteout support
, Bharata B Rao
, (Mon May 14, 2:44 am)
[RFC][PATCH 13/14] ext3 whiteout support
, Bharata B Rao
, (Mon May 14, 2:44 am)
[RFC][PATCH 14/14] tmpfs whiteout support
, Bharata B Rao
, (Mon May 14, 2:45 am)
Re: [RFC][PATCH 9/14] Union-mount readdir
, Carsten Otte
, (Mon May 14, 3:43 am)
Re: [RFC][PATCH 9/14] Union-mount readdir
, Bharata B Rao
, (Mon May 14, 4:15 am)
Re: [RFC][PATCH 14/14] tmpfs whiteout support
, Hugh Dickins
, (Mon May 14, 9:13 am)
Re: [RFC][PATCH 14/14] tmpfs whiteout support
, Jan Blunck
, (Mon May 14, 12:20 pm)
Re: [RFC][PATCH 14/14] tmpfs whiteout support
, Hugh Dickins
, (Mon May 14, 12:35 pm)
Re: [RFC][PATCH 13/14] ext3 whiteout support
, Badari Pulavarty
, (Mon May 14, 1:16 pm)
Re: [RFC][PATCH 13/14] ext3 whiteout support
, Andreas Dilger
, (Mon May 14, 1:17 pm)
Re: [RFC][PATCH 5/14] Introduce union stack
, Badari Pulavarty
, (Mon May 14, 1:23 pm)
Re: [RFC][PATCH 13/14] ext3 whiteout support
, Jan Blunck
, (Mon May 14, 1:35 pm)
Re: [RFC][PATCH 2/14] Add a new mount flag (MNT_UNION) fo ...
, Jan Engelhardt
, (Mon May 14, 1:38 pm)
Re: [RFC][PATCH 3/14] Add the whiteout file type
, Jan Engelhardt
, (Mon May 14, 1:39 pm)
Re: [RFC][PATCH 5/14] Introduce union stack
, Jan Engelhardt
, (Mon May 14, 1:48 pm)
Re: [RFC][PATCH 5/14] Introduce union stack
, Jan Engelhardt
, (Mon May 14, 1:51 pm)
Re: [RFC][PATCH 6/14] Union-mount dentry reference counting
, Jan Engelhardt
, (Mon May 14, 1:57 pm)
Re: [RFC][PATCH 5/14] Introduce union stack
, Badari Pulavarty
, (Mon May 14, 3:40 pm)
Re: [RFC][PATCH 3/14] Add the whiteout file type
, Jan Blunck
, (Mon May 14, 11:00 pm)
Re: [RFC][PATCH 13/14] ext3 whiteout support
, Bharata B Rao
, (Mon May 14, 11:26 pm)
Re: [RFC][PATCH 5/14] Introduce union stack
, Bharata B Rao
, (Mon May 14, 11:28 pm)
Re: [RFC][PATCH 5/14] Introduce union stack
, Jan Blunck
, (Tue May 15, 12:19 am)
Re: [RFC][PATCH 7/14] Union-mount mounting
, Jan Engelhardt
, (Tue May 15, 12:29 am)
Re: [RFC][PATCH 8/14] Union-mount lookup
, Jan Engelhardt
, (Tue May 15, 12:57 am)
Re: [RFC][PATCH 2/14] Add a new mount flag (MNT_UNION) fo ...
, Bharata B Rao
, (Tue May 15, 1:16 am)
Re: [RFC][PATCH 13/14] ext3 whiteout support
, Jan Blunck
, (Tue May 15, 1:31 am)
Re: [RFC][PATCH 2/14] Add a new mount flag (MNT_UNION) for ...
, Eric Van Hensbergen
, (Tue May 15, 5:06 am)
Re: [RFC][PATCH 2/14] Add a new mount flag (MNT_UNION) for ...
, Jan Blunck
, (Tue May 15, 5:53 am)
Re: [RFC][PATCH 8/14] Union-mount lookup
, Trond Myklebust
, (Tue May 15, 7:00 am)
Re: [RFC][PATCH 13/14] ext3 whiteout support
, Theodore Tso
, (Tue May 15, 7:28 am)
Re: [RFC][PATCH 7/14] Union-mount mounting
, Bharata B Rao
, (Tue May 15, 10:04 pm)
Re: [RFC][PATCH 8/14] Union-mount lookup
, Bharata B Rao
, (Tue May 15, 10:08 pm)
Re: [RFC][PATCH 10/14] In-kernel file copy between union m ...
, Jan Engelhardt
, (Wed May 16, 12:57 am)
Re: [RFC][PATCH 11/14] VFS whiteout handling
, Jan Engelhardt
, (Wed May 16, 1:06 am)
Re: [RFC][PATCH 12/14] ext2 whiteout support
, Jan Engelhardt
, (Wed May 16, 1:07 am)
Re: [RFC][PATCH 8/14] Union-mount lookup
, Jan Engelhardt
, (Wed May 16, 12:28 pm)
Re: [RFC][PATCH 8/14] Union-mount lookup
, Serge E. Hallyn
, (Wed May 16, 1:06 pm)
Re: [RFC][PATCH 8/14] Union-mount lookup
, Bharata B Rao
, (Fri May 18, 4:05 am)
Re: [RFC][PATCH 10/14] In-kernel file copy between union m ...
, Bharata B Rao
, (Fri May 18, 4:10 am)
Re: [RFC][PATCH 10/14] In-kernel file copy between union m ...
, Shaya Potter
, (Fri May 18, 6:47 am)
Re: [RFC][PATCH 5/14] Introduce union stack
, Paul Dickson
, (Sat May 19, 3:18 am)
Re: [RFC][PATCH 10/14] In-kernel file copy between union m ...
, Bharata B Rao
, (Mon May 21, 8:13 pm)
Re: [RFC][PATCH 10/14] In-kernel file copy between union m ...
, Jan Engelhardt
, (Mon May 21, 11:25 pm)
Re: [RFC][PATCH 10/14] In-kernel file copy between union m ...
, Bharata B Rao
, (Tue May 22, 1:38 am)
Re: [RFC][PATCH 10/14] In-kernel file copy between union m ...
, Shaya Potter
, (Tue May 22, 5:35 am)
Re: [RFC][PATCH 5/14] Introduce union stack
, Jan Engelhardt
, (Tue May 22, 9:35 am)
Re: [RFC][PATCH 10/14] In-kernel file copy between union m ...
, Bharata B Rao
, (Wed May 23, 3:41 am)
Re: [RFC][PATCH 5/14] Introduce union stack
, Serge E. Hallyn
, (Wed May 23, 6:25 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate