]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6deb55214bb5edc2731a6f4ce325819b86b003ff
treea98bdf5573f03d0e7f69dcc927f4f709f842def7
parent2dba8f5647a51e0bdef46788d382346e11b5086e
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