From 251b1d5a62266ace034bcb8647879f91eb500aa2 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 20 May 2019 15:54:49 -0700 Subject: [PATCH] f2fs: allow ssr block allocation during checkpoint=disable period This patch allows to use ssr during checkpoint is disabled. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index e610a94c7da7..5345aca751b3 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -387,7 +387,8 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi, goto next; /* Don't touch checkpointed data */ if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED) && - get_ckpt_valid_blocks(sbi, segno))) + get_ckpt_valid_blocks(sbi, segno) && + p.alloc_mode != SSR)) goto next; if (gc_type == BG_GC && test_bit(secno, dirty_i->victim_secmap)) goto next; -- 2.11.0