]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: store file handle of lower inode on copy up
authorAmir Goldstein <amir73il@gmail.com>
Thu, 30 Mar 2017 12:22:16 +0000 (15:22 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 5 May 2017 09:38:58 +0000 (11:38 +0200)
commite6bf5cb9e140ab4c79bc19b56d02a52aefda5b18
tree97aaeff1699be25ad83ad8a4612ce3e16e116683
parent16b66c995ae5c4ba7606c3d660510734e1a28b2a
ovl: store file handle of lower inode on copy up

Sometimes it is interesting to know if an upper file is pure upper or a
copy up target, and if it is a copy up target, it may be interesting to
find the copy up origin.

This will be used to preserve lower inode numbers across copy up.

Store the lower inode file handle in upper inode extended attribute
overlay.origin on copy up to use it later for these cases.  Store the lower
filesystem uuid along side the file handle, so we can validate that we are
looking for the origin file in the original fs.

If lower fs does not support NFS export ops store a zero sized xattr so we
can always use the overlay.origin xattr to distinguish between a copy up
and a pure upper inode.

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