diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-02-10 00:27:09 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-03-19 21:41:26 +0300 |
commit | 8c7b9ac129d0962faa6f8b092424eab3427cc364 (patch) | |
tree | 1cfdc32622d7fb4e4eec1e0b9c6beec08072e84b /fs/f2fs | |
parent | bbbc34fd66625473d20f89def2703f4f140d2ce8 (diff) | |
download | linux-8c7b9ac129d0962faa6f8b092424eab3427cc364.tar.xz |
f2fs: add migration count iff migration happens
If first segment is empty and migration_granularity is 1, we can't move this
at all.
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index a19966b0e018..bb0b6435dcf7 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1240,12 +1240,12 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi, segno, gc_type); stat_inc_seg_count(sbi, type, gc_type); + migrated++; freed: if (gc_type == FG_GC && get_valid_blocks(sbi, segno, false) == 0) seg_freed++; - migrated++; if (__is_large_section(sbi) && segno + 1 < end_segno) sbi->next_victim_seg[gc_type] = segno + 1; |