summaryrefslogtreecommitdiffstats
path: root/fs/qnx6
diff options
context:
space:
mode:
authorHou Pengyang <houpengyang@huawei.com>2017-02-16 12:34:31 +0000
committerBen Hutchings <ben@decadent.org.uk>2017-06-05 21:17:15 +0100
commitf417a02fe6d3286467ddabc8720c4885a3e56094 (patch)
treec3cfa0093894524e9682cb78b363e0e6c966313a /fs/qnx6
parent9d38c630f587aa407780ca51ded7278c2ebc7bfc (diff)
downloadlinux-stable-f417a02fe6d3286467ddabc8720c4885a3e56094.tar.gz
linux-stable-f417a02fe6d3286467ddabc8720c4885a3e56094.tar.bz2
linux-stable-f417a02fe6d3286467ddabc8720c4885a3e56094.zip
f2fs: add ovp valid_blocks check for bg gc victim to fg_gc
commit e93b9865251a0503d83fd570e7d5a7c8bc351715 upstream. 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. Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> [bwh: Backported to 3.16: - In get_victim_by_default(), use continue rather than goto - Adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/qnx6')
0 files changed, 0 insertions, 0 deletions