linux-stable/fs/overlayfs
Konstantin Khlebnikov 410fb31d89 ovl: skip overlayfs superblocks at global sync
[ Upstream commit 32b1924b21 ]

Stacked filesystems like overlayfs has no own writeback, but they have to
forward syncfs() requests to backend for keeping data integrity.

During global sync() each overlayfs instance calls method ->sync_fs() for
backend although it itself is in global list of superblocks too.  As a
result one syscall sync() could write one superblock several times and send
multiple disk barriers.

This patch adds flag SB_I_SKIP_SYNC into sb->sb_iflags to avoid that.

Reported-by: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Stable-dep-of: b836c4d29f ("ima: detect changes to the backing overlay file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-08 08:43:26 +01:00
..
Kconfig
Makefile
copy_up.c overlayfs: set ctime when setting mtime and atime 2023-10-25 11:16:53 +02:00
dir.c ovl: Use ovl mounter's fsuid and fsgid in ovl_link() 2023-01-18 11:30:40 +01:00
export.c ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() 2022-08-25 11:14:54 +02:00
file.c ovl: fix unneeded call to ovl_change_flags() 2020-07-22 09:32:10 +02:00
inode.c ovl: perform vfs_getxattr() with mounter creds 2021-02-23 15:00:56 +01:00
namei.c new helper: lookup_positive_unlocked() 2023-09-23 10:47:59 +02:00
overlayfs.h ovl: fix warning in ovl_create_real() 2021-12-22 09:19:04 +01:00
ovl_entry.h ovl: fix regression caused by overlapping layers detection 2019-09-21 07:17:14 +02:00
readdir.c ovl: fix wrong WARN_ON() in ovl_cache_update_ino() 2020-02-11 04:34:02 -08:00
super.c ovl: skip overlayfs superblocks at global sync 2023-12-08 08:43:26 +01:00
util.c ovl: detect overlapping layers 2019-06-25 11:35:52 +08:00