From 2c70c5e3874e8cf2f39f4ce4e2b832f4380a0c1b Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Wed, 24 Oct 2018 18:37:26 +0800 Subject: f2fs: introduce __is_large_section() for cleanup Introduce a wrapper __is_large_section() to clean up codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/f2fs/gc.c') diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 9707773fdaac..84f49cb3147c 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1109,7 +1109,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi, int submitted = 0; /* readahead multi ssa blocks those have contiguous address */ - if (sbi->segs_per_sec > 1) + if (__is_large_section(sbi)) f2fs_ra_meta_pages(sbi, GET_SUM_BLOCK(sbi, segno), sbi->segs_per_sec, META_SSA, true); @@ -1318,7 +1318,7 @@ void f2fs_build_gc_manager(struct f2fs_sb_info *sbi) sbi->gc_pin_file_threshold = DEF_GC_FAILED_PINNED_FILES; /* give warm/cold data area from slower device */ - if (sbi->s_ndevs && sbi->segs_per_sec == 1) + if (sbi->s_ndevs && !__is_large_section(sbi)) SIT_I(sbi)->last_victim[ALLOC_NEXT] = GET_SEGNO(sbi, FDEV(0).end_blk) + 1; } -- cgit v1.2.3