From: Jaegeuk Kim Date: Sun, 9 Feb 2020 21:23:28 +0000 (-0800) Subject: f2fs: skip GC when section is full X-Git-Tag: v5.7-rc1~60^2~40 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=2bac07635ddf9ed59268e61e415d8de9c5eaded7;p=linux-block.git f2fs: skip GC when section is full This fixes skipping GC when segment is full in large section. Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index bb0b6435dcf7..0dfdec4926e4 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1025,8 +1025,8 @@ next_step: * race condition along with SSR block allocation. */ if ((gc_type == BG_GC && has_not_enough_free_secs(sbi, 0, 0)) || - get_valid_blocks(sbi, segno, false) == - sbi->blocks_per_seg) + get_valid_blocks(sbi, segno, true) == + BLKS_PER_SEC(sbi)) return submitted; if (check_valid_map(sbi, segno, off) == 0)