OSDN Git Service

f2fs: allow ssr block allocation during checkpoint=disable period
authorJaegeuk Kim <jaegeuk@kernel.org>
Mon, 20 May 2019 22:54:49 +0000 (15:54 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 14 Jun 2019 03:38:00 +0000 (20:38 -0700)
This patch allows to use ssr during checkpoint is disabled.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c

index e610a94..5345aca 100644 (file)
@@ -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;