ovl: whiteout orphan index entries on mount
authorAmir Goldstein <amir73il@gmail.com>
Thu, 11 Jan 2018 13:33:51 +0000 (15:33 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Jan 2018 10:25:56 +0000 (11:25 +0100)
commit24f0b17203691d22815e842051a014e3bde7c227
treeb4a2a55684b6413ee380c1ac645831d2e3185ce3
parente7dd0e71348c1e3bc4b9d767c1ffbcbdee46a726
ovl: whiteout orphan index entries on mount

Orphan index entries are non-dir index entries whose union nlink count
dropped to zero. With index=on, orphan index entries are removed on
mount. With NFS export feature enabled, orphan index entries are replaced
with white out index entries to block future open by handle from opening
the lower file.

When dir index has a stale 'upper' xattr, we assume that the upper dir
was removed and we treat the dir index as orphan entry that needs to be
whited out or removed.

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