Skip to content

RFC Union mount core rewrite v1

Valerie Aurora linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6union-mount: Introduce union_mount structure and basic operationsfs/Kconfig fs/Makefile fs/dcache.c +4 more+385 -04 replies
2/6union-mount: Drive the union cache via dcachefs/dcache.c fs/union.c include/linux/dcache.h +1 more+81 -04 replies
3/6union-mount: Implement union lookupfs/namei.c fs/union.c include/linux/union.h+266 -10 replies
4/6union-mount: Support for mounting union mount file systemsfs/namespace.c fs/union.c include/linux/union.h+183 -10 replies
5/6union-mount: Call do_whiteout() on unlink and rmdir in unionsfs/namei.c+8 -00 replies
6/6union-mount: Copy up directory entries on first readdir()fs/readdir.c fs/union.c include/linux/union.h+171 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/6] Union mount core rewrite v1

This is a major rewrite of parts of union mounts, in particular the pathname lookup code. For more info about union mounts, see:

http://valerieaurora.org/union/

The previous code had two important problems fixed in this series:

- On file open, is_unionized() grabs vfsmount lock and walks up the mount tree even for non-union mounts.

- Pathname lookup required three cut-n-pasted versions of two complex functions, one for each of cached/real/"hashed" lookups.

This rewrite reduces the additional cost of a non-union lookup in a CONFIG_UNION_MOUNT kernel to either 1 or 2 mount flag tests (but adds the requirement that file systems be unioned only at their root directories). This rewrite implements lookup with one lookup_union() function for all types of lookups.

This posted patch series includes only the union lookup, mount, and readdir patches and not the relatively uncontroversial whiteout and fallthru code. Rewrite of the in-kernel file copyup is next on my todo list.

The entire patch set is against Viro's for-next branch, and available at:

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

Branch no_copyup. Please review! Thanks,

-VAL

Jan Blunck (3):
union-mount: Introduce union_mount structure and basic operations
union-mount: Drive the union cache via dcache
union-mount: Call do_whiteout() on unlink and rmdir in unions

Valerie Aurora (3):
union-mount: Implement union lookup
union-mount: Support for mounting union mount file systems
union-mount: Copy up directory entries on first readdir()

 fs/Kconfig             |   13 +
 fs/Makefile            |    1 +
 fs/dcache.c            |   17 ++
 fs/namei.c             |  199 +++++++++++++++-
 fs/namespace.c         |  123 ++++++++++-
 fs/readdir.c           |    9 +
 fs/union.c             |  629 ++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/dcache.h |   28 +++
 include/linux/mount.h  |    3 +
 include/linux/union.h  |   74 ++++++
 10 files changed, 1094 insertions(+), 2 deletions(-)
 create mode 100644 fs/union.c
 create mode 100644 include/linux/union.h