aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorGravatar Chao Yu <chao@kernel.org> 2022-09-14 21:28:46 +0800
committerGravatar Jaegeuk Kim <jaegeuk@kernel.org> 2022-10-04 13:31:44 -0700
commitd80afefb17e01aa0c46a8eebc01882e0ebd8b0f6 (patch)
tree6747a0fcfacd0d1c6d315e89f79da9067c391969 /fs/f2fs/segment.c
parentf2fs: code clean and fix a type error (diff)
downloadlinux-d80afefb17e01aa0c46a8eebc01882e0ebd8b0f6.tar.gz
linux-d80afefb17e01aa0c46a8eebc01882e0ebd8b0f6.tar.bz2
linux-d80afefb17e01aa0c46a8eebc01882e0ebd8b0f6.zip
f2fs: fix to account FS_CP_DATA_IO correctly
f2fs_inode_info.cp_task was introduced for FS_CP_DATA_IO accounting since commit b0af6d491a6b ("f2fs: add app/fs io stat"). However, cp_task usage coverage has been increased due to below commits: commit 040d2bb318d1 ("f2fs: fix to avoid deadloop if data_flush is on") commit 186857c5a14a ("f2fs: fix potential recursive call when enabling data_flush") So that, if data_flush mountoption is on, when data flush was triggered from background, the IO from data flush will be accounted as checkpoint IO type incorrectly. In order to fix this issue, this patch splits cp_task into two: a) cp_task: used for IO accounting b) wb_task: used to avoid deadlock Fixes: 040d2bb318d1 ("f2fs: fix to avoid deadloop if data_flush is on") Fixes: 186857c5a14a ("f2fs: fix potential recursive call when enabling data_flush") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 460048f3c850..3f14c0a4fb89 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -476,7 +476,7 @@ do_sync:
mutex_lock(&sbi->flush_lock);
blk_start_plug(&plug);
- f2fs_sync_dirty_inodes(sbi, FILE_INODE);
+ f2fs_sync_dirty_inodes(sbi, FILE_INODE, false);
blk_finish_plug(&plug);
mutex_unlock(&sbi->flush_lock);