summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2020-02-09 13:28:45 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-03-19 11:41:26 -0700
commitdabfbbc8f914504670a7fbeaf933aa253cbb8acc (patch)
treea42691fd0c9a4758e8ab22a0b492e7f7603fbe04 /fs/f2fs
parent7bd2935870c05048d8a7db4f502524e78e516617 (diff)
f2fs: skip migration only when BG_GC is called
FG_GC needs to move entire section more quickly. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index f6958ae8c157..9ead93fcf78a 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1211,7 +1211,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
if (get_valid_blocks(sbi, segno, false) == 0)
goto freed;
- if (__is_large_section(sbi) &&
+ if (gc_type == BG_GC && __is_large_section(sbi) &&
migrated >= sbi->migration_granularity)
goto skip;
if (!PageUptodate(sum_page) || unlikely(f2fs_cp_error(sbi)))