]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ovl: Ensure upper filesystem supports d_type
authorVivek Goyal <vgoyal@redhat.com>
Mon, 22 Feb 2016 14:28:34 +0000 (09:28 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 18 May 2017 04:22:48 +0000 (21:22 -0700)
commita4b8b4de52f0cd6681d9a3000ae6f83fc0206baa
tree78b0c61a0d5840eb3b87030ce1c7af1227e87e39
parent5fe100ac31a6f977ebb64ce4eea7b0e3de7dbe04
ovl: Ensure upper filesystem supports d_type

In some instances xfs has been created with ftype=0 and there if a file
on lower fs is removed, overlay leaves a whiteout in upper fs but that
whiteout does not get filtered out and is visible to overlayfs users.

And reason it does not get filtered out because upper filesystem does
not report file type of whiteout as DT_CHR during iterate_dir().

So it seems to be a requirement that upper filesystem support d_type for
overlayfs to work properly. Do this check during mount and fail if d_type
is not supported.

Suggested-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 45aebeaf4f67468f76bedf62923a576a519a9b68)
Signed-off-by: Divya Indi <divya.indi@oracle.com>
Orabug: 25802620
fs/overlayfs/overlayfs.h
fs/overlayfs/readdir.c
fs/overlayfs/super.c