]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ovl: mark upper merge dir with type origin entries "impure"
authorAmir Goldstein <amir73il@gmail.com>
Wed, 24 May 2017 12:29:33 +0000 (15:29 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 29 May 2017 09:48:00 +0000 (11:48 +0200)
commitf3a1568582cc207663a4d5e37da790334372855b
tree00f5b95a4ef417098629a7f16493beb194e5c60c
parentee1d6d37b6b884383b501089be93ce94f2153028
ovl: mark upper merge dir with type origin entries "impure"

An upper dir is marked "impure" to let ovl_iterate() know that this
directory may contain non pure upper entries whose d_ino may need to be
read from the origin inode.

We already mark a non-merge dir "impure" when moving a non-pure child
entry inside it, to let ovl_iterate() know not to iterate the non-merge
dir directly.

Mark also a merge dir "impure" when moving a non-pure child entry inside
it and when copying up a child entry inside it.

This can be used to optimize ovl_iterate() to perform a "pure merge" of
upper and lower directories, merging the content of the directories,
without having to read d_ino from origin inodes.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/copy_up.c
fs/overlayfs/dir.c
fs/overlayfs/namei.c
fs/overlayfs/overlayfs.h
fs/overlayfs/super.c
fs/overlayfs/util.c