2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 16:53:54 +08:00
linux-next/fs/overlayfs
Amir Goldstein 359f392ca5 ovl: lookup index entry for copy up origin
When inodes index feature is enabled, lookup in indexdir for the index
entry of lower real inode or copy up origin inode. The index entry name
is the hex representation of the lower inode file handle.

If the index dentry in negative, then either no lower aliases have been
copied up yet, or aliases have been copied up in older kernels and are
not indexed.

If the index dentry for a copy up origin inode is positive, but points
to an inode different than the upper inode, then either the upper inode
has been copied up and not indexed or it was indexed, but since then
index dir was cleared. Either way, that index cannot be used to indentify
the overlay inode.

If a positive dentry that matches the upper inode was found, then it is
safe to use the copy up origin st_ino for upper hardlinks, because all
indexed upper hardlinks are represented by the same overlay inode as the
copy up origin.

Set the INDEX type flag on an indexed upper dentry. A non-upper dentry
may also have a positive index from copy up of another lower hardlink.
This situation will be handled by following patches.

Index lookup is going to be used to prevent breaking hardlinks on copy up.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2017-07-04 22:03:17 +02:00
..
copy_up.c ovl: verify index dir matches upper dir 2017-07-04 22:03:17 +02:00
dir.c ovl: move __upperdentry to ovl_inode 2017-07-04 22:03:16 +02:00
inode.c ovl: lookup index entry for copy up origin 2017-07-04 22:03:17 +02:00
Kconfig ovl: introduce the inodes index dir feature 2017-07-04 22:03:17 +02:00
Makefile ovl: split super.c 2016-12-16 11:02:56 +01:00
namei.c ovl: lookup index entry for copy up origin 2017-07-04 22:03:17 +02:00
overlayfs.h ovl: lookup index entry for copy up origin 2017-07-04 22:03:17 +02:00
ovl_entry.h ovl: introduce the inodes index dir feature 2017-07-04 22:03:17 +02:00
readdir.c ovl: proper cleanup of workdir 2016-09-01 11:11:59 +02:00
super.c ovl: verify index dir matches upper dir 2017-07-04 22:03:17 +02:00
util.c ovl: introduce the inodes index dir feature 2017-07-04 22:03:17 +02:00