linux/fs/overlayfs
Amir Goldstein eedc92622b ovl: mark xwhiteouts directory with overlay.opaque='x'
commit 420332b941 upstream.

An opaque directory cannot have xwhiteouts, so instead of marking an
xwhiteouts directory with a new xattr, overload overlay.opaque xattr
for marking both opaque dir ('y') and xwhiteouts dir ('x').

This is more efficient as the overlay.opaque xattr is checked during
lookup of directory anyway.

This also prevents unnecessary checking the xattr when reading a
directory without xwhiteouts, i.e. most of the time.

Note that the xwhiteouts marker is not checked on the upper layer and
on the last layer in lowerstack, where xwhiteouts are not expected.

Fixes: bc8df7a3dc ("ovl: Add an alternative type of whiteout")
Cc: <stable@vger.kernel.org> # v6.7
Reviewed-by: Alexander Larsson <alexl@redhat.com>
Tested-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-01-31 16:21:11 -08:00
..
copy_up.c ovl: fix dentry reference leak after changes to underlying layers 2023-12-17 13:33:46 +02:00
dir.c ovl: Add an alternative type of whiteout 2023-10-31 00:12:59 +02:00
export.c ovl: reorder ovl_want_write() after ovl_inode_lock() 2023-10-31 00:12:57 +02:00
file.c ovl: add helper ovl_file_modified() 2023-10-31 00:12:55 +02:00
inode.c fs: Pass AT_GETATTR_NOSEC flag to getattr interface function 2023-11-18 14:54:07 +01:00
Kconfig ovl: Kconfig: introduce CONFIG_OVERLAY_FS_DEBUG 2023-08-12 19:02:53 +03:00
Makefile ovl: Move xattr support to new xattrs.c file 2023-10-31 00:12:59 +02:00
namei.c ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-31 16:21:11 -08:00
overlayfs.h ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-31 16:21:11 -08:00
ovl_entry.h ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-31 16:21:11 -08:00
params.c ovl: fix memory leak in ovl_parse_param() 2023-11-14 08:09:36 +02:00
params.h ovl: store and show the user provided lowerdir mount option 2023-10-31 00:13:02 +02:00
readdir.c ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-31 16:21:11 -08:00
super.c ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-31 16:21:11 -08:00
util.c ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-31 16:21:11 -08:00
xattrs.c ovl: Support escaped overlay.* xattrs 2023-10-31 00:12:59 +02:00