aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHou Pengyang <houpengyang@huawei.com>2017-02-16 12:34:31 +0000
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:34:56 +0200
commitea38bb4097053a5d1ebabc1f38083af62c2f69a8 (patch)
tree76327cfa4cc133d57efa457af0297a6d350a91c6 /lib
parent403227bad1e085bf67e45895871d51cc4f1d176e (diff)
f2fs: add ovp valid_blocks check for bg gc victim to fg_gc
For foreground gc, greedy algorithm should be adapted, which makes this formula work well: (2 * (100 / config.overprovision + 1) + 6) But currently, we fg_gc have a prior to select bg_gc victim segments to gc first, these victims are selected by cost-benefit algorithm, we can't guarantee such segments have the small valid blocks, which may destroy the f2fs rule, on the worstest case, would consume all the free segments. This patch fix this by add a filter in check_bg_victims, if segment's has # of valid blocks over overprovision ratio, skip such segments. Cc: <stable@vger.kernel.org> Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions