Skip to content

Commit 100c065

Browse files
author
Jaegeuk Kim
committed
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: fd8c8ca ("f2fs: let checkpoint flush dnode page of regular") Fixes: 4354994 ("f2fs: checkpoint disabling") Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 00e09c0 commit 100c065

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎fs/f2fs/node.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,8 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
15241524
if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
15251525
goto redirty_out;
15261526

1527-
if (wbc->sync_mode == WB_SYNC_NONE &&
1527+
if (!is_sbi_flag_set(sbi, SBI_CP_DISABLED) &&
1528+
wbc->sync_mode == WB_SYNC_NONE &&
15281529
IS_DNODE(page) && is_cold_node(page))
15291530
goto redirty_out;
15301531

@@ -1909,7 +1910,8 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi,
19091910
}
19101911

19111912
if (step < 2) {
1912-
if (wbc->sync_mode == WB_SYNC_NONE && step == 1)
1913+
if (!is_sbi_flag_set(sbi, SBI_CP_DISABLED) &&
1914+
wbc->sync_mode == WB_SYNC_NONE && step == 1)
19131915
goto out;
19141916
step++;
19151917
goto next_step;

0 commit comments

Comments
 (0)