f2fs: readahead contiguous SSA blocks for f2fs_gc
[linux-block.git] / fs / f2fs / gc.c
index b161db4a96a45f76d0af2edc60f588b2c7e72595..d94acbc3d9280a9253bc71a5a2a8710b432235af 100644 (file)
@@ -708,6 +708,11 @@ gc_more:
                goto stop;
        ret = 0;
 
+       /* readahead multi ssa blocks those have contiguous address */
+       if (sbi->segs_per_sec > 1)
+               ra_meta_pages(sbi, GET_SUM_BLOCK(sbi, segno), sbi->segs_per_sec,
+                                                               META_SSA);
+
        for (i = 0; i < sbi->segs_per_sec; i++)
                do_garbage_collect(sbi, segno + i, &ilist, gc_type);