SSR uses get_victim to select ssr segment to allocate data blocks, which makes the previous result of victim_secmap inaccurately, so we would better clear the bit of the section in the victim_secmap.
Signed-off-by: Yunlong Song <yunlong.s...@huawei.com> --- fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 705d419..0e7a265 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -394,7 +394,8 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi, set_bit(secno, dirty_i->victim_secmap); sbi->cur_bg_victim_sec = secno; } - } + } else + clear_bit(secno, dirty_i->victim_secmap); *result = (p.min_segno / p.ofs_unit) * p.ofs_unit; trace_f2fs_get_victim(sbi->sb, type, gc_type, &p, -- 1.8.5.2 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel