diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-08-28 19:58:26 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-09-06 16:18:26 -0700 |
commit | 100c06554ef3020f7836bb34dfec4cc2a7cbf30a (patch) | |
tree | 665e8fdd65217dc5be5b129055685f840913f9d1 /fs/f2fs | |
parent | 00e09c0bccc71825ca9a659eb145ed7c4dc95588 (diff) | |
download | linux-100c06554ef3020f7836bb34dfec4cc2a7cbf30a.tar.bz2 |
f2fs: fix flushing node pages when checkpoint is disabled
This patch fixes skipping node page writes when checkpoint is disabled.
In this period, we can't rely on checkpoint to flush node pages.
Fixes: fd8c8caf7e7c ("f2fs: let checkpoint flush dnode page of regular")
Fixes: 4354994f097d ("f2fs: checkpoint disabling")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/node.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e5044eec8097..8b66bc4c004b 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1524,7 +1524,8 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING))) goto redirty_out; - if (wbc->sync_mode == WB_SYNC_NONE && + if (!is_sbi_flag_set(sbi, SBI_CP_DISABLED) && + wbc->sync_mode == WB_SYNC_NONE && IS_DNODE(page) && is_cold_node(page)) goto redirty_out; @@ -1909,7 +1910,8 @@ continue_unlock: } if (step < 2) { - if (wbc->sync_mode == WB_SYNC_NONE && step == 1) + if (!is_sbi_flag_set(sbi, SBI_CP_DISABLED) && + wbc->sync_mode == WB_SYNC_NONE && step == 1) goto out; step++; goto next_step; |