login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
4
Re: [PATCH 21/38] union-mount: Support for mounting union mount file systems
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Valerie Aurora
Subject:
Re: [PATCH 21/38] union-mount: Support for mounting union mount file systems
Date: Wednesday, August 4, 2010 - 2:59 pm
On Tue, Jul 20, 2010 at 11:12:17AM +0800, Ian Kent wrote:
quoted text
> On Fri, 2010-07-16 at 17:02 -0400, Valerie Aurora wrote: > > On Tue, Jul 13, 2010 at 12:47:02PM +0800, Ian Kent wrote: > > > On Tue, Jun 15, 2010 at 11:39:51AM -0700, Valerie Aurora wrote: > > > > + > > > > +static int > > > > +check_mnt_union(struct path *mntpnt, struct vfsmount *topmost_mnt, int mnt_flags) > > > > +{ > > > > + struct vfsmount *lower_mnt = mntpnt->mnt; > > > > + > > > > + if (!(mnt_flags & MNT_UNION)) > > > > + return 0; > > > > + > > > > +#ifndef CONFIG_UNION_MOUNT > > > > + return -EINVAL; > > > > +#endif > > > > + if (!(lower_mnt->mnt_sb->s_flags & MS_RDONLY)) > > > > + return -EBUSY; > > > > + > > > > + if (!list_empty(&lower_mnt->mnt_mounts)) > > > > + return -EBUSY; > > > > + > > > > + if (!IS_ROOT(mntpnt->dentry)) > > > > + return -EINVAL; > > > > + > > > > + if (mnt_flags & MNT_READONLY) > > > > + return -EROFS; > > > > + > > > > + if (!(topmost_mnt->mnt_sb->s_flags & MS_WHITEOUT)) > > > > + return -EINVAL; > > > > + > > > > > > Is there a need to check fallthru, umm ... that probably doesn't > > > apply for the ROOT(), right? > > > > Actually, that's on my todo list - right now I'm assuming MS_WHITEOUT > > implies fallthru support as well. But it doesn't. > > > > We're a little short on MS_* flags. I'm thinking of just checking > > ->whiteout and ->fallthru for non-NULL on the root dir and getting rid > > of MS_WHITEOUT entirely. Thoughts? > > Checking for the methods is a good idea I think, since they are assumed > to be present by the code, at least in some places. > > Although it shouldn't happen, it is possible for a file system to create > the root dentry with these methods defined but other dentrys without > them defined, so a file system implementation error could cause some > unpleasant crashes. Maybe requiring the flags to indicate support would > help avoid unpleasant implementation problems like this, not sure > really. > > Also not sure if a method existence check should always be made prior to > use, regardless.
I went for MS_WHITEOUT and MS_FALLTHRU, and added the checks for the ops being non-null. -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
:
Stephen Smalley
Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching
Paul Gortmaker
[34-longterm 237/260] KVM: x86: Move TSC reset out of vmcb_init
Mathieu Desnoyers
Re: Linux 2.6.25-rc2
Alex Riesen
Re: [PATCH 4/7] lib: Introduce strnstr()
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
git
:
Mike Miller
git message
Wincent Colaiuta
Re: [RFC PATCH] Make the rebase edit mode really end up in an edit state
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Kevin Ballard
Re: git check-attr -z and quoting
Dan Chokola
Re: how do you "force a pull"?
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Sebastian Andrzej Siewior
[PATCH v2] net/core: use ntohs for skb->protocol
Badalian Vyacheslav
Re: tc filter flow hash question
Parav Pandit
ip6 route output() and ip_route_output_key() by drivers
Jarek Poplawski
Re: tc filter flow hash question
git-commits-head
:
Linux Kernel Mailing List
mm: fix build on non-mmu machines
Linux Kernel Mailing List
ALSA: hda: Use olpc-xo-1_5 quirk for Toshiba Satellite P500-PSPGSC-01800T
Linux Kernel Mailing List
i915: Don't whine when pci_enable_msi() fails.
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
Staging: rt2870: Removal of kernel_thread() API
openbsd-misc
:
Tony Abernethy
Re: The Atheros story in much fewer words
ropers
Re: Real men don't attack straw men
"RALOVICH, Kristóf"
Re: thinkpad windows refund
Kevin
Re: uvm_mapent_alloc: out of static map entries on 4.3 i386
Nick Holland
Re: Install OpenBSD from USB ?
Colocation donated by:
Syndicate