Konstantin Khlebnikov 8c85e455f7 ovl: skip overlayfs superblocks at global sync
[ Upstream commit 32b1924b210a70dcacdf65abd687c5ef86a67541 ]

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: b836c4d29f27 ("ima: detect changes to the backing overlay file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-08 08:44:27 +01:00
..
2023-12-08 08:44:27 +01:00
2021-09-22 12:26:25 +02:00
2023-11-28 16:50:15 +00:00
2022-06-14 18:11:36 +02:00
2023-09-23 10:59:56 +02:00
2023-02-22 12:50:35 +01:00
2023-09-23 11:00:06 +02:00
2022-06-14 18:11:41 +02:00
2020-10-01 13:17:19 +02:00
2023-12-08 08:44:26 +01:00
2023-01-18 11:41:44 +01:00