Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca536475 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: allow ssr block allocation during checkpoint=disable period



This patch allows to use ssr during checkpoint is disabled.

Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 0b1504c8
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -387,7 +387,8 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi,
			goto next;
			goto next;
		/* Don't touch checkpointed data */
		/* Don't touch checkpointed data */
		if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED) &&
		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;
			goto next;
		if (gc_type == BG_GC && test_bit(secno, dirty_i->victim_secmap))
		if (gc_type == BG_GC && test_bit(secno, dirty_i->victim_secmap))
			goto next;
			goto next;