Skip to content

Union mount core for review

Valerie Aurora linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest34 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/34VFS: Make clone_mnt() and copy_tree() return error codesfs/namespace.c fs/pnode.c+63 -5313 replies
2/34VFS: Add CL_NO_SHARED flag to clone_mnt()/copy_tree()fs/namespace.c fs/pnode.h+4 -00 replies
3/34VFS: Add CL_NO_SLAVE flag to clone_mnt()/copy_tree()fs/namespace.c fs/pnode.h+4 -07 replies
4/34VFS: Add CL_MAKE_HARD_READONLY flag to clone_mnt()/copy_tree()fs/namespace.c fs/pnode.h include/linux/mount.h+20 -00 replies
5/34union-mount: Union mounts documentationDocumentation/filesystems/union-mounts.txt+744 -00 replies
6/34union-mount: Introduce MNT_UNION and MS_UNION flagsfs/namespace.c include/linux/fs.h include/linux/mount.h+6 -10 replies
7/34union-mount: Add CONFIG_UNION_MOUNT optionfs/Kconfig+13 -00 replies
8/34union-mount: Create union_stack structurefs/dcache.c fs/union.h include/linux/dcache.h+77 -20 replies
9/34union-mount: Add two superblock fields for union mountsinclude/linux/fs.h+12 -00 replies
10/34union-mount: Add union_alloc()fs/Makefile fs/union.c+43 -00 replies
11/34union-mount: Add union_find_dir()fs/union.h+10 -00 replies
12/34union-mount: Create d_free_unions()fs/union.c fs/union.h+32 -00 replies
13/34union-mount: Free union stack on removal of topmost dentry from dcachefs/dcache.c fs/namespace.c+13 -00 replies
14/34union-mount: Create union_add_dir()fs/union.c fs/union.h+30 -00 replies
15/34union-mount: Add union_create_topmost_dir()fs/union.c fs/union.h+37 -00 replies
16/34union-mount: Create IS_MNT_UNION()fs/union.h+2 -00 replies
17/34union-mount: Create needs_lookup_union()fs/union.c fs/union.h+51 -00 replies
18/34union-mount: Create check_topmost_union_mnt()fs/namespace.c+40 -00 replies
19/34union-mount: Add clone_union_tree() and put_union_sb()fs/namespace.c include/linux/mount.h+73 -00 replies
20/34union-mount: Create build_root_union()fs/namespace.c+48 -00 replies
21/34union-mount: Create prepare_mnt_union() and cleanup_mnt_union()fs/namespace.c+43 -00 replies
22/34union-mount: Prevent improper union-related remountsfs/namespace.c+12 -00 replies
23/34union-mount: Prevent topmost file system from being mounted elsewherefs/namespace.c+5 -02 replies
24/34union-mount: Prevent bind mounts of union mountsfs/namespace.c+6 -00 replies
25/34union-mount: Implement union mountfs/namespace.c fs/super.c+13 -10 replies
26/34union-mount: Temporarily disable some syscallsfs/namei.c+17 -00 replies
27/34union-mount: Basic infrastructure of __union_lookup()fs/namei.c+68 -00 replies
28/34union-mount: Process negative dentries in __union_lookup()fs/namei.c+22 -10 replies
29/34union-mount: Return files found in lower layers in __union_lookup()fs/namei.c+23 -00 replies
30/34union-mount: Build union stack in __lookup_union()fs/namei.c+16 -20 replies
31/34union-mount: Follow mount in __lookup_union()fs/namei.c+2 -00 replies
32/34union-mount: Add lookup_union() wrapper for __lookup_union()fs/namei.c+27 -00 replies
33/34union-mount: Add do_lookup_union() wrapper for __lookup_union()fs/namei.c+22 -00 replies
34/34union-mount: Call union lookup functions in lookup pathfs/namei.c+10 -00 replies

Reviews trailers per patch

1 of 34 patches has a Reviewed-by or Acked-by.

PatchMiklos Szeredi
1/34A-b
2/34
3/34
4/34
5/34
6/34
7/34
8/34
9/34
10/34
11/34
12/34
13/34
14/34
15/34
16/34
17/34
18/34
19/34
20/34
21/34
22/34
23/34
24/34
25/34
26/34
27/34
28/34
29/34
30/34
31/34
32/34
33/34
34/34

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/34] Union mount core for review

This series is the core mount and lookup infrastructure from union mounts, split up into small, easily digestible, bikeshed-friendly pieces. All of the (non-documentation, non-whitespace) patches in this series are less than 140 lines long. It's like Twitter for kernel patches.

VFS developers should be able to review each of these patches in 3 minutes or less. If it takes you longer, email me and I'll post a video on YouTube making fun of you.

Changes since last posted version:

- Lower directory entries now in one array, not linked list
- Use clone_mnt() flags to automate hard read-only counts
- Actually enforce top-layer-mounted-only-once rule
- Retune DNAME_INLINE_LEN_MIN to keep 64-byte alignment
- Updated documentation

Next on the todo list:

- Rewrite in-kernel copyup to be more awesomer
* Prevent half-finished copies appearing after crash
* Set correct owners/perms/etc. of copied up dirs/files
* Remove races between parent/target lookup
* On metadata writes, only copyup file data if it succeeds
- Keep reviewing hybrid union patches

After I finish that (3-4 weeks?), I have nothing major left on my to-do list. I'm sure that will change as I get code reviews. :)

Against 2.6.35. The rest of the series (whiteouts, fallthrus, soon-to-be-obsolete copyup, etc.) is in branch "split_lookup" in:

git://git.kernel.org/pub/scm/linux/kernel/git/val/linux-2.6.git

Thanks for reviewing!

-VAL

Jan Blunck (3):
union-mount: Introduce MNT_UNION and MS_UNION flags
union-mount: Free union stack on removal of topmost dentry from
dcache
union-mount: Create IS_MNT_UNION()

Valerie Aurora (31):
VFS: Make clone_mnt() and copy_tree() return error codes
VFS: Add CL_NO_SHARED flag to clone_mnt()/copy_tree()
VFS: Add CL_NO_SLAVE flag to clone_mnt()/copy_tree()
VFS: Add CL_MAKE_HARD_READONLY flag to clone_mnt()/copy_tree()
union-mount: Union mounts documentation
union-mount: Add CONFIG_UNION_MOUNT option
union-mount: Create union_stack structure
union-mount: Add two superblock fields for union mounts
union-mount: Add union_alloc()
union-mount: Add union_find_dir()
union-mount: Create d_free_unions()
union-mount: Create union_add_dir()
union-mount: Add union_create_topmost_dir()
union-mount: Create needs_lookup_union()
union-mount: Create check_topmost_union_mnt()
union-mount: Add clone_union_tree() and put_union_sb()
union-mount: Create build_root_union()
union-mount: Create prepare_mnt_union() and cleanup_mnt_union()
union-mount: Prevent improper union-related remounts
union-mount: Prevent topmost file system from being mounted elsewhere
union-mount: Prevent bind mounts of union mounts
union-mount: Implement union mount
union-mount: Temporarily disable some syscalls
union-mount: Basic infrastructure of __union_lookup()
union-mount: Process negative dentries in __union_lookup()
union-mount: Return files found in lower layers in __union_lookup()
union-mount: Build union stack in __lookup_union()
union-mount: Follow mount in __lookup_union()
union-mount: Add lookup_union() wrapper for __lookup_union()
union-mount: Add do_lookup_union() wrapper for __lookup_union()
union-mount: Call union lookup functions in lookup path

 Documentation/filesystems/union-mounts.txt |  744 ++++++++++++++++++++++++++++
 fs/Kconfig                                 |   13 +
 fs/Makefile                                |    1 +
 fs/dcache.c                                |   14 +
 fs/namei.c                                 |  204 ++++++++
 fs/namespace.c                             |  378 ++++++++++++--
 fs/pnode.c                                 |    5 +-
 fs/pnode.h                                 |    3 +
 fs/super.c                                 |    1 +
 fs/union.c                                 |  178 +++++++
 fs/union.h                                 |   80 +++
 include/linux/dcache.h                     |   22 +-
 include/linux/fs.h                         |   13 +
 include/linux/mount.h                      |    4 +
 14 files changed, 1604 insertions(+), 56 deletions(-)
 create mode 100644 Documentation/filesystems/union-mounts.txt
 create mode 100644 fs/union.c
 create mode 100644 fs/union.h