[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1532355022-163029-4-git-send-email-yunlong.song@huawei.com>
Date: Mon, 23 Jul 2018 22:10:20 +0800
From: Yunlong Song <yunlong.song@...wei.com>
To: <jaegeuk@...nel.org>, <chao@...nel.org>, <yuchao0@...wei.com>,
<yunlong.song@...oud.com>, <yunlong.song@...wei.com>
CC: <miaoxie@...wei.com>, <bintian.wang@...wei.com>,
<shengyong1@...wei.com>, <heyunlei@...wei.com>,
<linux-f2fs-devel@...ts.sourceforge.net>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH 3/5] f2fs: clear_bit the SSR selected section in the victim_secmap
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.song@...wei.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
Powered by blists - more mailing lists