]> git.ipfire.org Git - people/ms/linux.git/commit - fs/f2fs/gc.c
f2fs: fix count of seg_freed to make sec_freed correct
authorYunlong Song <yunlong.song@huawei.com>
Wed, 24 Oct 2018 08:08:30 +0000 (16:08 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 26 Nov 2018 23:53:55 +0000 (15:53 -0800)
commitd6c66cd19ef322fe0d51ba09ce1b7f386acab04a
treea98bdf5573f03d0e7f69dcc927f4f709f842def7
parenta8075dc484cf10ebdb07bee2b17322fb0a846309
f2fs: fix count of seg_freed to make sec_freed correct

When sbi->segs_per_sec > 1, and if some segno has 0 valid blocks before
gc starts, do_garbage_collect will skip counting seg_freed++, and this
will cause seg_freed < sbi->segs_per_sec and finally skip sec_freed++.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c