Skip to content

Commit

Permalink
f2fs: do SSR for data when there is enough free space
Browse files Browse the repository at this point in the history
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: Yunlong Song <yunlong.song@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Yunlong Song authored and Jaegeuk Kim committed Feb 24, 2017
1 parent b9cd206 commit 035e97a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 035e97a

Please sign in to comment.