linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 00/73] Union Mount [ver #2]
@ 2012-02-21 17:57 David Howells
  2012-02-21 17:57 ` [PATCH 01/73] VFS: Make chown() and lchown() call fchownat() " David Howells
                   ` (74 more replies)
  0 siblings, 75 replies; 89+ messages in thread
From: David Howells @ 2012-02-21 17:57 UTC (permalink / raw)
  To: linux-fsdevel, viro, valerie.aurora; +Cc: linux-kernel



Here's the current state of the unionmount patches.

Significant changes made include:

 (1) Brought up to date with the current changes in the VFS (eg. RCU pathwalk,
     mount/vfsmount struct split).

 (2) Moved the copy-up for namei metadata syscalls that modify an inode
     (eg. link(), utimes(), setxattr()) into pathwalk.  These syscalls now
     merely need to provide LOOKUP_COPY_UP to pathwalk and the copy up is done
     there.

     One thing I'm not certain of is that this (and the original patches)
     would do the copy up, even if the caller didn't have permission to alter
     the inode and the system call failed the permission check after the copy
     up had taken place.

     Truncate and open-write don't suffer that issue.

 (3) Merged the in-development ext2 patches in and completed them - at least I
     think I did, one of them didn't say what it did.

 (4) Added some code to override the credentials around upper inode creation
     to make sure the inode gets the right UID/GID.  This doesn't help if the
     lower inode has some sort of foreign user identifier.

     Also, I'm not sure whether the LSM xattrs should be blindly copied up.
     Should the LSM policies applicable to the lower fs's apply to the upper
     fs too?

 (5) Added a marker flag for mounts on the lower fs.  There is the possibility
     of having a file mounted over a file on the upperfs.  I suspect some of
     the logic will malfunction in such a case as the previous component will
     be seen to be on the upperfs and the current component not on a unioned
     fs - and may trigger a copyup attempt.

 (6) Added a patch to pass the mount flags to sget() and thence to the compare
     routine.  sget() installs them in the superblock before returning it.

 (7) Added a patch to combine the multiple chown syscalls.

 (8) Moved the xattr copyup code earlier so that it can be used for directories
     too (it is called there, but isn't introduced till a later patch).

 (9) Added a patch to have a second lock class for use by unionmounts for
     i_mutex and i_dir_mutex to stop complaints when a union is made of two
     filesystems of the same type.

     Unionmount over a unionmount will need special handling, and possibly
     rejecting.  It should just work, however if the two upper filesystems are
     the same type, lockdep will incorrectly moan a lot.

Some issues:

 (1) Need to handle automount points and managed directories.  Probably simply
     ignoring them is best.

 (2) Need to better handle mountpoints.  Currently it just calls
     follow_mount(), which is probably wrong.

 (3) do_lookup() needs to come up with the correct inode after
     needs_lookup_union() is called.  I think I have this right, but it could
     do with checking.

 (4) Should d_revalidate() be called on the lower fs objects under some
     circumstances.  I assume not, since we don't want to see the lower fs
     changing.

David
---
David Howells (21):
      fallthru: ext2 support for lookup of d_type/d_ino in fallthrus
      ext2: Add whiteout and opaque directory support
      ext2: Remove target inode pointer from ext2_add_entry()
      union-mount: Implement union-aware truncate()
      union-mount: Implement union-aware rename()
      union-mount: Make various syscalls aware (link, chmod, chown, utimes & setxattr)
      unionmount: Override creds when copying up a file to correctly set ownership
      unionmount: Add LOOKUP_COPY_UP
      union-mount: In-kernel file copyup routines
      union-mount: Add wrapper for lookup_union_locked() and RCU hook
      union-mount: Implement union mount
      union-mount: Duplicate the i_{,dir_}mutex lock classes and use for upper layer
      unionmount: Mark lower layers in union
      union-mount: Add union_create_topmost_dir()
      whiteout: Add vfs_whiteout() and whiteout inode operation
      VFS: Split inode_permission()
      VFS: Pass mount flags to sget()
      VFS: Make lookup_hash() return a struct path
      VFS: Comment mount following code
      VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors
      VFS: Make chown() and lchown() call fchownat()

Felix Fietkau (2):
      jffs2: Add fallthru support
      jffs2: Add whiteout support

Jan Blunck (6):
      union-mount: Create IS_MNT_UNION()
      union-mount: Free union stack on removal of topmost dentry from dcache
      union-mount: Introduce MNT_UNION and MS_UNION flags
      tmpfs: Add whiteout support
      whiteout: Allow removal of a directory with whiteouts
      whiteout/NFSD: Don't return information about whiteouts to userspace

Valerie Aurora (44):
      fallthru: jffs2 support for lookup of d_type/d_ino in fallthrus
      ext2: Add fallthru support
      ext2: Split ext2_add_entry() from ext2_add_link()
      ext2: Add ext2_dirent_in_use()
      union-mount: Implement union-aware writable open()
      union-mount: Implement union-aware access()/faccessat()
      VFS: Create user_path_nd() to lookup both parent and target
      fallthru: tmpfs support for lookup of d_type/d_ino in fallthrus
      union-mount: Add generic_readdir_fallthru() helper
      union-mount: Copy up directory entries on first readdir()
      union-mount: Set opaque flag on new directories in unioned file systems
      union-mount: Create whiteout on rmdir()
      union-mount: Create whiteout on unlink()
      union-mount: Call union lookup functions in lookup path
      union-mount: Add lookup_union_locked()
      union-mount: Follow mount in __lookup_union()
      union-mount: Build union stack in __lookup_union()
      union-mount: Return files found in lower layers in __lookup_union()
      union-mount: Process negative dentries in __lookup_union()
      union-mount: Basic infrastructure of __lookup_union()
      union-mount: Temporarily disable some syscalls
      union-mount: Prevent bind mounts of union mounts
      union-mount: Prevent topmost file system from being mounted elsewhere
      union-mount: Prevent improper union-related remounts
      union-mount: Create prepare_mnt_union() and cleanup_mnt_union()
      union-mount: Create build_root_union()
      union-mount: Add clone_union_tree() and put_union_sb()
      union-mount: Create check_topmost_union_mnt()
      union-mount: Create needs_lookup_union()
      union-mount: Create union_add_dir()
      union-mount: Create d_free_unions()
      union-mount: Add union_find_dir()
      union-mount: Add union_alloc()
      union-mount: Add two superblock fields for union mounts
      union-mount: Create union_stack structure
      union-mount: Add CONFIG_UNION_MOUNT option
      union-mount: Union mounts documentation
      tmpfs: Add fallthru support
      VFS: Basic fallthru definitions
      whiteout: Define flags and operations for opaque inodes
      VFS: Add CL_MAKE_HARD_READONLY flag to clone_mnt()/copy_tree()
      VFS: Add CL_NO_SLAVE flag to clone_mnt()/copy_tree()
      VFS: Add CL_NO_SHARED flag to clone_mnt()/copy_tree()
      VFS: Add hard read-only users count to superblock


 Documentation/filesystems/union-mounts.txt |  712 ++++++++++++++++++++++
 Documentation/filesystems/vfs.txt          |   16 
 drivers/mtd/mtdsuper.c                     |    4 
 fs/9p/vfs_super.c                          |    4 
 fs/Kconfig                                 |   12 
 fs/Makefile                                |    1 
 fs/afs/super.c                             |    3 
 fs/btrfs/super.c                           |    4 
 fs/ceph/super.c                            |    2 
 fs/cifs/cifsfs.c                           |    9 
 fs/compat.c                                |    9 
 fs/dcache.c                                |   28 +
 fs/devpts/inode.c                          |    6 
 fs/ecryptfs/main.c                         |    3 
 fs/ext2/dir.c                              |  181 +++++-
 fs/ext2/ext2.h                             |    3 
 fs/ext2/inode.c                            |   11 
 fs/ext2/namei.c                            |   73 ++
 fs/ext2/super.c                            |    6 
 fs/gfs2/ops_fstype.c                       |    5 
 fs/inode.c                                 |   48 +
 fs/internal.h                              |    5 
 fs/jffs2/dir.c                             |  117 +++-
 fs/jffs2/fs.c                              |    4 
 fs/jffs2/super.c                           |    2 
 fs/libfs.c                                 |   25 +
 fs/logfs/super.c                           |    3 
 fs/namei.c                                 |  906 +++++++++++++++++++++++++---
 fs/namespace.c                             |  391 ++++++++++--
 fs/nfs/super.c                             |   10 
 fs/nfsd/nfs3xdr.c                          |    5 
 fs/nfsd/nfs4xdr.c                          |    5 
 fs/nfsd/nfsxdr.c                           |    4 
 fs/nilfs2/super.c                          |    4 
 fs/open.c                                  |  131 +++-
 fs/pnode.c                                 |    5 
 fs/pnode.h                                 |    4 
 fs/proc/root.c                             |    3 
 fs/proc_namespace.c                        |    1 
 fs/readdir.c                               |   18 +
 fs/reiserfs/procfs.c                       |    2 
 fs/super.c                                 |   42 +
 fs/sysfs/mount.c                           |    3 
 fs/ubifs/super.c                           |    3 
 fs/union.c                                 |  721 ++++++++++++++++++++++
 fs/union.h                                 |  189 ++++++
 fs/utimes.c                                |    2 
 fs/xattr.c                                 |   10 
 include/linux/dcache.h                     |   40 +
 include/linux/ext2_fs.h                    |    8 
 include/linux/fs.h                         |   47 +
 include/linux/jffs2.h                      |    8 
 include/linux/mount.h                      |    5 
 include/linux/namei.h                      |    3 
 kernel/audit_tree.c                        |   10 
 kernel/cgroup.c                            |    2 
 mm/shmem.c                                 |  192 ++++++
 57 files changed, 3750 insertions(+), 320 deletions(-)
 create mode 100644 Documentation/filesystems/union-mounts.txt
 create mode 100644 fs/union.c
 create mode 100644 fs/union.h


^ permalink raw reply	[flat|nested] 89+ messages in thread

end of thread, other threads:[~2012-03-28 14:51 UTC | newest]

Thread overview: 89+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-21 17:57 [RFC][PATCH 00/73] Union Mount [ver #2] David Howells
2012-02-21 17:57 ` [PATCH 01/73] VFS: Make chown() and lchown() call fchownat() " David Howells
2012-02-21 17:57 ` [PATCH 02/73] VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors " David Howells
2012-02-21 17:57 ` [PATCH 03/73] VFS: Comment mount following code " David Howells
2012-02-21 17:57 ` [PATCH 04/73] VFS: Make lookup_hash() return a struct path " David Howells
2012-02-21 17:58 ` [PATCH 05/73] VFS: Pass mount flags to sget() " David Howells
2012-02-21 17:58 ` [PATCH 06/73] VFS: Split inode_permission() " David Howells
2012-02-21 17:58 ` [PATCH 07/73] VFS: Add hard read-only users count to superblock " David Howells
2012-02-21 17:58 ` [PATCH 08/73] VFS: Add CL_NO_SHARED flag to clone_mnt()/copy_tree() " David Howells
2012-02-29  6:56   ` Ram Pai
2012-02-21 17:58 ` [PATCH 09/73] VFS: Add CL_NO_SLAVE " David Howells
2012-02-29  6:58   ` Ram Pai
2012-02-21 17:58 ` [PATCH 10/73] VFS: Add CL_MAKE_HARD_READONLY " David Howells
2012-02-21 17:58 ` [PATCH 11/73] whiteout/NFSD: Don't return information about whiteouts to userspace " David Howells
2012-02-21 17:58 ` [PATCH 12/73] whiteout: Define flags and operations for opaque inodes " David Howells
2012-02-21 17:59 ` [PATCH 13/73] whiteout: Add vfs_whiteout() and whiteout inode operation " David Howells
2012-02-21 17:59 ` [PATCH 14/73] whiteout: Allow removal of a directory with whiteouts " David Howells
2012-02-21 17:59 ` [PATCH 15/73] tmpfs: Add whiteout support " David Howells
2012-02-21 17:59 ` [PATCH 16/73] VFS: Basic fallthru definitions " David Howells
2012-02-21 17:59 ` [PATCH 17/73] tmpfs: Add fallthru support " David Howells
2012-02-21 17:59 ` [PATCH 18/73] union-mount: Union mounts documentation " David Howells
2012-02-27  2:57   ` Randy Dunlap
2012-02-21 17:59 ` [PATCH 19/73] union-mount: Introduce MNT_UNION and MS_UNION flags " David Howells
2012-02-21 18:00 ` [PATCH 20/73] union-mount: Add CONFIG_UNION_MOUNT option " David Howells
2012-02-21 18:00 ` [PATCH 21/73] union-mount: Create union_stack structure " David Howells
2012-02-21 18:00 ` [PATCH 22/73] union-mount: Add two superblock fields for union mounts " David Howells
2012-02-21 18:00 ` [PATCH 23/73] union-mount: Add union_alloc() " David Howells
2012-02-21 18:00 ` [PATCH 24/73] union-mount: Add union_find_dir() " David Howells
2012-02-21 18:00 ` [PATCH 25/73] union-mount: Create d_free_unions() " David Howells
2012-02-21 18:00 ` [PATCH 26/73] union-mount: Free union stack on removal of topmost dentry from dcache " David Howells
2012-02-21 18:00 ` [PATCH 27/73] union-mount: Create union_add_dir() " David Howells
2012-02-21 18:01 ` [PATCH 28/73] union-mount: Add union_create_topmost_dir() " David Howells
2012-02-21 18:01 ` [PATCH 29/73] union-mount: Create IS_MNT_UNION() " David Howells
2012-02-21 18:01 ` [PATCH 30/73] union-mount: Create needs_lookup_union() " David Howells
2012-02-21 18:01 ` [PATCH 31/73] union-mount: Create check_topmost_union_mnt() " David Howells
2012-02-21 18:01 ` [PATCH 32/73] union-mount: Add clone_union_tree() and put_union_sb() " David Howells
2012-02-21 18:01 ` [PATCH 33/73] unionmount: Mark lower layers in union " David Howells
2012-02-21 18:01 ` [PATCH 34/73] union-mount: Create build_root_union() " David Howells
2012-02-21 18:01 ` [PATCH 35/73] union-mount: Create prepare_mnt_union() and cleanup_mnt_union() " David Howells
2012-02-21 18:02 ` [PATCH 36/73] union-mount: Prevent improper union-related remounts " David Howells
2012-02-21 18:02 ` [PATCH 37/73] union-mount: Prevent topmost file system from being mounted elsewhere " David Howells
2012-02-21 18:02 ` [PATCH 38/73] union-mount: Prevent bind mounts of union mounts " David Howells
2012-02-21 18:02 ` [PATCH 39/73] union-mount: Duplicate the i_{, dir_}mutex lock classes and use for upper layer " David Howells
2012-02-21 18:02 ` [PATCH 40/73] union-mount: Implement union mount " David Howells
2012-02-21 18:02 ` [PATCH 41/73] union-mount: Temporarily disable some syscalls " David Howells
2012-02-21 18:02 ` [PATCH 42/73] union-mount: Basic infrastructure of __lookup_union() " David Howells
2012-02-21 18:02 ` [PATCH 43/73] union-mount: Process negative dentries in " David Howells
2012-02-21 18:03 ` [PATCH 44/73] union-mount: Return files found in lower layers " David Howells
2012-02-21 18:03 ` [PATCH 45/73] union-mount: Build union stack " David Howells
2012-02-21 18:03 ` [PATCH 46/73] union-mount: Follow mount " David Howells
2012-02-21 18:03 ` [PATCH 47/73] union-mount: Add lookup_union_locked() " David Howells
2012-02-21 18:03 ` [PATCH 48/73] union-mount: Add wrapper for lookup_union_locked() and RCU hook " David Howells
2012-02-21 18:03 ` [PATCH 49/73] union-mount: Call union lookup functions in lookup path " David Howells
2012-02-21 18:03 ` [PATCH 50/73] union-mount: Create whiteout on unlink() " David Howells
2012-02-21 18:03 ` [PATCH 51/73] union-mount: Create whiteout on rmdir() " David Howells
2012-02-21 18:03 ` [PATCH 52/73] union-mount: Set opaque flag on new directories in unioned file systems " David Howells
2012-02-21 18:04 ` [PATCH 53/73] union-mount: Copy up directory entries on first readdir() " David Howells
2012-02-21 18:04 ` [PATCH 54/73] union-mount: Add generic_readdir_fallthru() helper " David Howells
2012-02-21 18:04 ` [PATCH 55/73] fallthru: tmpfs support for lookup of d_type/d_ino in fallthrus " David Howells
2012-02-21 18:04 ` [PATCH 56/73] union-mount: In-kernel file copyup routines " David Howells
2012-02-21 18:04 ` [PATCH 57/73] VFS: Create user_path_nd() to lookup both parent and target " David Howells
2012-02-21 18:04 ` [PATCH 58/73] unionmount: Add LOOKUP_COPY_UP " David Howells
2012-02-21 18:04 ` [PATCH 59/73] unionmount: Override creds when copying up a file to correctly set ownership " David Howells
2012-02-21 18:05 ` [PATCH 60/73] union-mount: Implement union-aware access()/faccessat() " David Howells
2012-02-21 18:05 ` [PATCH 61/73] union-mount: Make various syscalls aware (link, chmod, chown, utimes & setxattr) " David Howells
2012-02-21 18:05 ` [PATCH 62/73] union-mount: Implement union-aware rename() " David Howells
2012-02-21 18:05 ` [PATCH 63/73] union-mount: Implement union-aware writable open() " David Howells
2012-02-21 18:05 ` [PATCH 64/73] union-mount: Implement union-aware truncate() " David Howells
2012-02-21 18:05 ` [PATCH 65/73] ext2: Add ext2_dirent_in_use() " David Howells
2012-02-21 18:05 ` [PATCH 66/73] ext2: Split ext2_add_entry() from ext2_add_link() " David Howells
2012-02-27  0:04   ` Ted Ts'o
2012-02-27  3:30     ` Andreas Dilger
2012-02-27 19:09       ` Ted Ts'o
2012-02-27 20:45         ` Andreas Dilger
2012-02-21 18:05 ` [PATCH 67/73] ext2: Remove target inode pointer from ext2_add_entry() " David Howells
2012-02-27  0:22   ` Ted Ts'o
2012-02-21 18:06 ` [PATCH 68/73] ext2: Add whiteout and opaque directory support " David Howells
2012-02-21 18:06 ` [PATCH 69/73] ext2: Add fallthru " David Howells
2012-02-27  0:33   ` Ted Ts'o
2012-02-21 18:06 ` [PATCH 70/73] fallthru: ext2 support for lookup of d_type/d_ino in fallthrus " David Howells
2012-02-21 18:06 ` [PATCH 71/73] jffs2: Add whiteout support " David Howells
2012-02-21 18:06 ` [PATCH 72/73] jffs2: Add fallthru " David Howells
2012-02-21 18:06 ` [PATCH 73/73] fallthru: jffs2 support for lookup of d_type/d_ino in fallthrus " David Howells
2012-02-26  6:48 ` copy-up xattr (Re: [RFC][PATCH 00/73] Union Mount [ver #2]) J. R. Okajima
2012-03-26 14:22 ` David Howells
2012-03-27  4:38   ` Casey Schaufler
2012-03-27 13:10     ` David Quigley
2012-03-27 16:37       ` Casey Schaufler
2012-03-28 14:51   ` J. R. Okajima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).