diff options
author | Amir Goldstein <amir73il@gmail.com> | 2021-06-19 12:26:18 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2021-08-17 11:47:43 +0200 |
commit | 72db82115d2bdfbfba8b15a92d91872cfe1b40c6 (patch) | |
tree | ca2bf80ebd0806f50185fddda46d323459f15635 /fs/overlayfs/util.c | |
parent | a0c236b11706cc223252ad97e80871a18d9ee812 (diff) | |
download | linux-72db82115d2bdfbfba8b15a92d91872cfe1b40c6.tar.bz2 |
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>
Diffstat (limited to 'fs/overlayfs/util.c')
0 files changed, 0 insertions, 0 deletions