]> 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)
commit524bbbc90480e24f900802bc776f5ab488f4b6b4
treea98bdf5573f03d0e7f69dcc927f4f709f842def7
parent819b5da2c515033b06f43ad3fc676360e6078655
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