Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 035e97ad authored by Yunlong Song's avatar Yunlong Song Committed by Jaegeuk Kim
Browse files

f2fs: do SSR for data when there is enough free space



In allocate_segment_by_default(), need_SSR() already detected it's time to do
SSR. So, let's try to find victims for data segments more aggressively in time.

Signed-off-by: default avatarYunlong Song <yunlong.song@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent b9cd2061
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1540,7 +1540,7 @@ static int get_ssr_segment(struct f2fs_sb_info *sbi, int type)
	struct curseg_info *curseg = CURSEG_I(sbi, type);
	const struct victim_selection *v_ops = DIRTY_I(sbi)->v_ops;

	if (IS_NODESEG(type) || !has_not_enough_free_secs(sbi, 0, 0))
	if (IS_NODESEG(type))
		return v_ops->get_victim(sbi,
				&(curseg)->next_segno, BG_GC, type, SSR);