summaryrefslogtreecommitdiff
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-03-19 14:57:58 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2020-03-31 06:46:24 +0300
commit7bcd0cfa735d72037c71979f18a257b0c6a2b87f (patch)
treeed313a1908e07492a352980a1f60a27cd6cb3c0a /fs/f2fs/gc.c
parent62f63eea291b50a5677ae7503ac128803174698a (diff)
downloadlinux-7bcd0cfa735d72037c71979f18a257b0c6a2b87f.tar.xz
f2fs: don't trigger data flush in foreground operation
Data flush can generate heavy IO and cause long latency during flush, so it's not appropriate to trigger it in foreground operation. And also, we may face below potential deadlock during data flush: - f2fs_write_multi_pages - f2fs_write_raw_pages - f2fs_write_single_data_page - f2fs_balance_fs - f2fs_balance_fs_bg - f2fs_sync_dirty_inodes - filemap_fdatawrite -- stuck on flush same cluster Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index f122fe3dbba3..26248c8936db 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -113,7 +113,7 @@ do_gc:
prefree_segments(sbi), free_segments(sbi));
/* balancing f2fs's metadata periodically */
- f2fs_balance_fs_bg(sbi);
+ f2fs_balance_fs_bg(sbi, true);
next:
sb_end_write(sbi->sb);