summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-03-19 19:57:58 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-03-30 20:46:24 -0700
commit7bcd0cfa735d72037c71979f18a257b0c6a2b87f (patch)
treeed313a1908e07492a352980a1f60a27cd6cb3c0a /fs/f2fs/node.c
parent62f63eea291b50a5677ae7503ac128803174698a (diff)
downloadlwn-7bcd0cfa735d72037c71979f18a257b0c6a2b87f.tar.gz
lwn-7bcd0cfa735d72037c71979f18a257b0c6a2b87f.zip
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/node.c')
-rw-r--r--fs/f2fs/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 542335bdc100..ecbd6bd14a49 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1976,7 +1976,7 @@ static int f2fs_write_node_pages(struct address_space *mapping,
goto skip_write;
/* balancing f2fs's metadata in background */
- f2fs_balance_fs_bg(sbi);
+ f2fs_balance_fs_bg(sbi, true);
/* collect a number of dirty node pages and write together */
if (wbc->sync_mode != WB_SYNC_ALL &&