linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 00/76] Union Mount
@ 2011-06-17 16:00 David Howells
  2011-06-17 16:00 ` [PATCH 01/76] VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors David Howells
                   ` (76 more replies)
  0 siblings, 77 replies; 79+ messages in thread
From: David Howells @ 2011-06-17 16:00 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: hch



Here are the unionmount patches brought up to date wrt RCU walk pathwalk and
other changes.  

The whole stack builds at each patch point, apart from the last patch which
doesn't build yet.

There are some locking issues to be addressed:

 (1) Lots of lockdep noise when the upper and lower fs's are of the same type.

     I have a pair of patches to deal with that by making a second lock class
     for i_mutex and i_dir_mutex in struct file_system_type and using the
     second classes for the upper fs, but that precludes unionmounting over a
     unionmount in future.

 (2) do_union_copyup_len() generates lockdep noise because it gets a lock on
     the parent dir's i_mutex that's the same level as the one vfs_setxattr()
     wants to get on the i_mutex of the inode it is given.

 (3) Unmounting the lower fs before the upper fs will cause a deadlock.

	mount a /mnt
	mount -o union b /mnt
	mount --move /mnt /foo
	umount /mnt
	umount /foo

     because umount_tree() then calls d_free_unions() whilst its parent holds
     vfsmount_lock, but d_free_unions() calls mntput() which may also want that
     lock.  Cleanup should be deferred to release_mounts().

And some other issues:

 (1) I need to work out what the last two (ext2) patches are doing and
     integrate them.

 (2) The RCU pathwalk needs checking over, in particular my handling of
     sequence numbers.

 (3) Need to handle automount points and managed directories.

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

 (5) do_lookup() needs to come up with the correct inode after
     needs_lookup_union() is called.

 (6) 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 (2):
      union-mount: Duplicate the i_{,dir_}mutex lock classes and use for upper layer
      union-mount: Pass mount flags to sget()

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

Jan Blunck (8):
      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: Add vfs_whiteout() and whiteout inode operation
      whiteout/NFSD: Don't return information about whiteouts to userspace
      VFS: Make lookup_hash() return a struct path

Valerie Aurora (64):
      Temporary commit
      XXX - works but needs whiteout find entry removed
      union-mount: Implement union-aware lsetxattr()
      union-mount: Implement union-aware setxattr()
      union-mount: Implement union-aware utimensat()
      union-mount: Implement union-aware lchown()
      union-mount: Implement union-aware chmod()/fchmodat()
      union-mount: Implement union-aware truncate()
      union-mount: Implement union-aware chown()
      union-mount: Implement union-aware writable open()
      union-mount: Implement union-aware rename()
      union-mount: Implement union-aware link()
      union-mount: Implement union-aware access()/faccessat()
      union-mount: In-kernel file copyup routines
      VFS: Create user_path_nd() to lookup both parent and target
      VFS: Split inode_permission() and create path_permission()
      fallthru: jffs2 support for lookup of d_type/d_ino in fallthrus
      fallthru: tmpfs support for lookup of d_type/d_ino in fallthrus
      fallthru: ext2 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 do_lookup_union() wrapper for __lookup_union()
      union-mount: Add lookup_union()
      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: Implement union mount
      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: Add union_create_topmost_dir()
      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
      ext2: Add fallthru support
      VFS: Basic fallthru definitions
      ext2: Add whiteout support
      ext2: Split ext2_add_entry() from ext2_add_link()
      ext2: Add ext2_dirent_in_use()
      whiteout: Define flags and operations for opaque inodes
      VFS: Comment follow_mount() and friends
      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
      VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors


 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                           |    8 
 fs/compat.c                                |    9 
 fs/dcache.c                                |   29 +
 fs/devpts/inode.c                          |    6 
 fs/ecryptfs/main.c                         |    3 
 fs/ext2/dir.c                              |  146 ++++
 fs/ext2/ext2.h                             |    3 
 fs/ext2/inode.c                            |   11 
 fs/ext2/namei.c                            |   77 ++
 fs/ext2/super.c                            |    6 
 fs/gfs2/ops_fstype.c                       |    5 
 fs/inode.c                                 |   48 +
 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                                 |  921 +++++++++++++++++++++++++---
 fs/namespace.c                             |  385 ++++++++++--
 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                                  |  116 +++-
 fs/pnode.c                                 |    5 
 fs/pnode.h                                 |    3 
 fs/proc/root.c                             |    3 
 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                                 |  685 +++++++++++++++++++++
 fs/union.h                                 |  107 +++
 fs/utimes.c                                |   14 
 fs/xattr.c                                 |   65 ++
 include/linux/dcache.h                     |   39 +
 include/linux/ext2_fs.h                    |    8 
 include/linux/fs.h                         |   51 +-
 include/linux/jffs2.h                      |    8 
 include/linux/mount.h                      |    4 
 include/linux/namei.h                      |    2 
 kernel/audit_tree.c                        |   10 
 kernel/cgroup.c                            |    2 
 mm/shmem.c                                 |  192 +++++-
 55 files changed, 3679 insertions(+), 297 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] 79+ messages in thread

end of thread, other threads:[~2011-06-17 16:53 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-17 16:00 [RFC][PATCH 00/76] Union Mount David Howells
2011-06-17 16:00 ` [PATCH 01/76] VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors David Howells
2011-06-17 16:00 ` [PATCH 02/76] VFS: Add hard read-only users count to superblock David Howells
2011-06-17 16:00 ` [PATCH 03/76] VFS: Add CL_NO_SHARED flag to clone_mnt()/copy_tree() David Howells
2011-06-17 16:00 ` [PATCH 04/76] VFS: Add CL_NO_SLAVE " David Howells
2011-06-17 16:00 ` [PATCH 05/76] VFS: Add CL_MAKE_HARD_READONLY " David Howells
2011-06-17 16:01 ` [PATCH 06/76] VFS: Comment follow_mount() and friends David Howells
2011-06-17 16:53   ` Christoph Hellwig
2011-06-17 16:01 ` [PATCH 07/76] VFS: Make lookup_hash() return a struct path David Howells
2011-06-17 16:01 ` [PATCH 08/76] whiteout/NFSD: Don't return information about whiteouts to userspace David Howells
2011-06-17 16:01 ` [PATCH 09/76] whiteout: Define flags and operations for opaque inodes David Howells
2011-06-17 16:01 ` [PATCH 10/76] whiteout: Add vfs_whiteout() and whiteout inode operation David Howells
2011-06-17 16:01 ` [PATCH 11/76] whiteout: Allow removal of a directory with whiteouts David Howells
2011-06-17 16:01 ` [PATCH 12/76] tmpfs: Add whiteout support David Howells
2011-06-17 16:02 ` [PATCH 13/76] ext2: Add ext2_dirent_in_use() David Howells
2011-06-17 16:02 ` [PATCH 14/76] ext2: Split ext2_add_entry() from ext2_add_link() David Howells
2011-06-17 16:02 ` [PATCH 15/76] ext2: Add whiteout support David Howells
2011-06-17 16:02 ` [PATCH 16/76] jffs2: " David Howells
2011-06-17 16:02 ` [PATCH 17/76] VFS: Basic fallthru definitions David Howells
2011-06-17 16:02 ` [PATCH 18/76] ext2: Add fallthru support David Howells
2011-06-17 16:03 ` [PATCH 19/76] tmpfs: " David Howells
2011-06-17 16:03 ` [PATCH 20/76] jffs2: " David Howells
2011-06-17 16:03 ` [PATCH 21/76] union-mount: Union mounts documentation David Howells
2011-06-17 16:03 ` [PATCH 22/76] union-mount: Introduce MNT_UNION and MS_UNION flags David Howells
2011-06-17 16:03 ` [PATCH 23/76] union-mount: Add CONFIG_UNION_MOUNT option David Howells
2011-06-17 16:03 ` [PATCH 24/76] union-mount: Create union_stack structure David Howells
2011-06-17 16:03 ` [PATCH 25/76] union-mount: Add two superblock fields for union mounts David Howells
2011-06-17 16:04 ` [PATCH 26/76] union-mount: Add union_alloc() David Howells
2011-06-17 16:04 ` [PATCH 27/76] union-mount: Add union_find_dir() David Howells
2011-06-17 16:04 ` [PATCH 28/76] union-mount: Create d_free_unions() David Howells
2011-06-17 16:04 ` [PATCH 29/76] union-mount: Free union stack on removal of topmost dentry from dcache David Howells
2011-06-17 16:04 ` [PATCH 30/76] union-mount: Create union_add_dir() David Howells
2011-06-17 16:04 ` [PATCH 31/76] union-mount: Add union_create_topmost_dir() David Howells
2011-06-17 16:04 ` [PATCH 32/76] union-mount: Create IS_MNT_UNION() David Howells
2011-06-17 16:05 ` [PATCH 33/76] union-mount: Create needs_lookup_union() David Howells
2011-06-17 16:05 ` [PATCH 34/76] union-mount: Create check_topmost_union_mnt() David Howells
2011-06-17 16:05 ` [PATCH 35/76] union-mount: Add clone_union_tree() and put_union_sb() David Howells
2011-06-17 16:05 ` [PATCH 36/76] union-mount: Create build_root_union() David Howells
2011-06-17 16:05 ` [PATCH 37/76] union-mount: Create prepare_mnt_union() and cleanup_mnt_union() David Howells
2011-06-17 16:05 ` [PATCH 38/76] union-mount: Prevent improper union-related remounts David Howells
2011-06-17 16:05 ` [PATCH 39/76] union-mount: Prevent topmost file system from being mounted elsewhere David Howells
2011-06-17 16:06 ` [PATCH 40/76] union-mount: Prevent bind mounts of union mounts David Howells
2011-06-17 16:06 ` [PATCH 41/76] union-mount: Implement union mount David Howells
2011-06-17 16:06 ` [PATCH 42/76] union-mount: Temporarily disable some syscalls David Howells
2011-06-17 16:06 ` [PATCH 43/76] union-mount: Basic infrastructure of __lookup_union() David Howells
2011-06-17 16:06 ` [PATCH 44/76] union-mount: Process negative dentries in __lookup_union() David Howells
2011-06-17 16:06 ` [PATCH 45/76] union-mount: Return files found in lower layers " David Howells
2011-06-17 16:06 ` [PATCH 46/76] union-mount: Build union stack " David Howells
2011-06-17 16:07 ` [PATCH 47/76] union-mount: Follow mount " David Howells
2011-06-17 16:07 ` [PATCH 48/76] union-mount: Add lookup_union() David Howells
2011-06-17 16:07 ` [PATCH 49/76] union-mount: Add do_lookup_union() wrapper for __lookup_union() David Howells
2011-06-17 16:07 ` [PATCH 50/76] union-mount: Call union lookup functions in lookup path David Howells
2011-06-17 16:07 ` [PATCH 51/76] union-mount: Create whiteout on unlink() David Howells
2011-06-17 16:07 ` [PATCH 52/76] union-mount: Create whiteout on rmdir() David Howells
2011-06-17 16:07 ` [PATCH 53/76] union-mount: Set opaque flag on new directories in unioned file systems David Howells
2011-06-17 16:08 ` [PATCH 54/76] union-mount: Copy up directory entries on first readdir() David Howells
2011-06-17 16:08 ` [PATCH 55/76] union-mount: Add generic_readdir_fallthru() helper David Howells
2011-06-17 16:08 ` [PATCH 56/76] fallthru: ext2 support for lookup of d_type/d_ino in fallthrus David Howells
2011-06-17 16:08 ` [PATCH 57/76] fallthru: tmpfs " David Howells
2011-06-17 16:08 ` [PATCH 58/76] fallthru: jffs2 " David Howells
2011-06-17 16:08 ` [PATCH 59/76] VFS: Split inode_permission() and create path_permission() David Howells
2011-06-17 16:09 ` [PATCH 60/76] VFS: Create user_path_nd() to lookup both parent and target David Howells
2011-06-17 16:09 ` [PATCH 61/76] union-mount: In-kernel file copyup routines David Howells
2011-06-17 16:09 ` [PATCH 62/76] union-mount: Implement union-aware access()/faccessat() David Howells
2011-06-17 16:09 ` [PATCH 63/76] union-mount: Implement union-aware link() David Howells
2011-06-17 16:09 ` [PATCH 64/76] union-mount: Implement union-aware rename() David Howells
2011-06-17 16:09 ` [PATCH 65/76] union-mount: Implement union-aware writable open() David Howells
2011-06-17 16:09 ` [PATCH 66/76] union-mount: Implement union-aware chown() David Howells
2011-06-17 16:10 ` [PATCH 67/76] union-mount: Implement union-aware truncate() David Howells
2011-06-17 16:10 ` [PATCH 68/76] union-mount: Implement union-aware chmod()/fchmodat() David Howells
2011-06-17 16:10 ` [PATCH 69/76] union-mount: Implement union-aware lchown() David Howells
2011-06-17 16:10 ` [PATCH 70/76] union-mount: Implement union-aware utimensat() David Howells
2011-06-17 16:10 ` [PATCH 71/76] union-mount: Implement union-aware setxattr() David Howells
2011-06-17 16:10 ` [PATCH 72/76] union-mount: Implement union-aware lsetxattr() David Howells
2011-06-17 16:10 ` [PATCH 73/76] union-mount: Pass mount flags to sget() David Howells
2011-06-17 16:11 ` [PATCH 74/76] union-mount: Duplicate the i_{, dir_}mutex lock classes and use for upper layer David Howells
2011-06-17 16:11 ` [PATCH 76/76] Temporary commit David Howells
2011-06-17 16:23 ` [PATCH 75/76] Ext2: Unionmount devel David Howells
2011-06-17 16:44 ` [RFC][PATCH 00/76] Union Mount Sedat Dilek

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).