linux/fs/overlayfs
Amir Goldstein 72db82115d ovl: copy up sync/noatime fileattr flags
When a lower file has sync/noatime fileattr flags, the behavior of
overlayfs post copy up is inconsistent.

Immediately after copy up, ovl inode still has the S_SYNC/S_NOATIME
inode flags copied from lower inode, so vfs code still treats the ovl
inode as sync/noatime.  After ovl inode evict or mount cycle,
the ovl inode does not have these inode flags anymore.

To fix this inconsistency, try to copy the fileattr flags on copy up
if the upper fs supports the fileattr_set() method.

This gives consistent behavior post copy up regardless of inode eviction
from cache.

We cannot copy up the immutable/append-only inode flags in a similar
manner, because immutable/append-only inodes cannot be linked and because
overlayfs will not be able to set overlay.* xattr on the upper inodes.

Those flags will be addressed by a followup patch.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2021-08-17 11:47:43 +02:00
..
copy_up.c ovl: copy up sync/noatime fileattr flags 2021-08-17 11:47:43 +02:00
dir.c ovl: pass ovl_fs to ovl_check_setxattr() 2021-08-17 11:47:43 +02:00
export.c ovl: fix uninitialized pointer read in ovl_lookup_real_one() 2021-08-10 10:21:30 +02:00
file.c ovl: fix deadlock in splice write 2021-08-10 10:21:30 +02:00
inode.c ovl: copy up sync/noatime fileattr flags 2021-08-17 11:47:43 +02:00
Kconfig docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
namei.c ovl: pass ovl_fs to ovl_check_setxattr() 2021-08-17 11:47:43 +02:00
overlayfs.h ovl: copy up sync/noatime fileattr flags 2021-08-17 11:47:43 +02:00
ovl_entry.h ovl: implement volatile-specific fsync error behaviour 2021-01-28 10:22:48 +01:00
readdir.c ovl: skip stale entries in merge dir cache iteration 2021-08-10 10:21:30 +02:00
super.c ovl: allow upperdir inside lowerdir 2021-04-12 12:00:37 +02:00
util.c ovl: pass ovl_fs to ovl_check_setxattr() 2021-08-17 11:47:43 +02:00