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
..
2019-08-09 09:15:05 +02:00
2019-09-17 10:27:46 -07:00
2020-02-19 19:53:09 +01:00
2019-08-20 22:09:52 +02:00
2022-10-26 13:22:39 +02:00
2019-08-28 21:17:12 -06:00
2023-08-08 19:56:33 +02:00
2019-09-17 19:15:14 -07:00
2019-09-23 11:21:04 -07:00
2020-03-25 08:25:58 +01:00
2019-09-05 11:40:54 +02:00
2019-10-02 06:36:50 -07:00
2023-10-25 11:53:22 +02:00
2022-10-26 13:22:46 +02:00
2022-04-15 14:18:32 +02:00
2023-08-11 11:53:43 +02:00
2019-12-13 08:42:53 +01:00
2021-03-04 10:26:29 +01:00
2022-08-25 11:18:04 +02:00
2021-02-07 15:35:49 +01:00
2022-10-07 09:16:54 +02:00
2019-09-29 10:33:41 -07:00
2019-12-13 08:43:18 +01:00
2019-08-14 15:30:35 +02:00
2023-09-23 10:59:40 +02:00
2023-11-20 10:30:10 +01:00
2023-06-21 15:44:10 +02:00
2020-03-18 07:17:46 +01:00
2019-08-01 21:49:46 +02:00
2023-11-28 16:50:16 +00:00
2023-10-25 11:53:18 +02:00
2023-10-25 11:53:18 +02:00
2019-07-31 19:03:35 +02:00
2020-04-02 15:11:00 +02:00
2021-03-07 12:20:49 +01:00
2019-09-07 21:42:25 +02:00
2019-08-01 20:51:22 +02:00
2019-07-31 19:03:35 +02:00
2020-04-02 15:11:00 +02:00
2021-06-10 13:37:14 +02:00