Revert "f2fs: add ovp valid_blocks check for bg gc victim to fg_gc"
authorChao Yu <yuchao0@huawei.com>
Thu, 26 Apr 2018 09:05:51 +0000 (17:05 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 31 May 2018 18:31:50 +0000 (11:31 -0700)
commit299254d85dec4ac0515a14e6d96ff70841302719
tree4151ae868d885a7d2996bb7101a39710c57a02e5
parent868de6135f060b966a9320cc54bf12249b5c0f99
Revert "f2fs: add ovp valid_blocks check for bg gc victim to fg_gc"

For extreme case:
10 section, op = 10%, no_fggc_threshold = 90%
All section usage: 85% 85% 85% 85% 90% 90% 95% 95% 95% 95%

During foreground GC, if we skip select dirty section whose usage
is larger than no_fggc_threshold, we can only recycle 80% invalid
space from four 85% usage sections and two 90% usage sections,
result in encountering out-of-space issue.

This reverts commit e93b9865251a0503d83fd570e7d5a7c8bc351715 to
fix this issue, besides, we keep the logic that we scan all dirty
section when searching a victim, so that GC can select victim with
least valid blocks.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/gc.c
fs/f2fs/segment.h