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.6.7~35 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=b0d0decd3d51a1d81f0414c925de55303964d84e;p=wrapfs-3.14.y.git f2fs: skip GC when section is full [ Upstream commit 2bac07635ddf9ed59268e61e415d8de9c5eaded7 ] This fixes skipping GC when segment is full in large section. Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 2f645c591a00..3cced15efebc 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1018,8 +1018,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)