提交 100c0655 编写于 作者: J Jaegeuk Kim

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: fd8c8caf ("f2fs: let checkpoint flush dnode page of regular")
Fixes: 4354994f ("f2fs: checkpoint disabling")
Reviewed-by: NChao Yu <yuchao0@huawei.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 00e09c0b
...@@ -1524,7 +1524,8 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, ...@@ -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))) if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
goto redirty_out; 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)) IS_DNODE(page) && is_cold_node(page))
goto redirty_out; goto redirty_out;
...@@ -1909,7 +1910,8 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi, ...@@ -1909,7 +1910,8 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi,
} }
if (step < 2) { 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; goto out;
step++; step++;
goto next_step; goto next_step;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册