mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 23:12:03 +00:00
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>
This commit is contained in:
parent
bbbc34fd66
commit
8c7b9ac129
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user