f2fs: do SSR for data when there is enough free space
authorYunlong Song <yunlong.song@huawei.com>
Wed, 22 Feb 2017 12:50:49 +0000 (20:50 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 24 Feb 2017 17:39:52 +0000 (09:39 -0800)
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>
fs/f2fs/segment.c

index 454c07d470fca772bf39e3b04f1e7a192fff2f31..46e29c5552998841a015326f4da179afc31f09fc 100644 (file)
@@ -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);