From 53b467232d3ac6573214a8870c31624c8d381131 Mon Sep 17 00:00:00 2001 From: Park Ju Hyung Date: Tue, 14 May 2019 15:36:23 +0900 Subject: [PATCH] f2fs: always assume that the device is idle under gc_urgent This allows more aggressive discards and balancing job to be done under gc_urgent. Signed-off-by: Park Ju Hyung Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index d5daeef6f840..102fa006f593 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2260,6 +2260,9 @@ static inline struct bio *f2fs_bio_alloc(struct f2fs_sb_info *sbi, static inline bool is_idle(struct f2fs_sb_info *sbi, int type) { + if (sbi->gc_mode == GC_URGENT) + return true; + if (get_pages(sbi, F2FS_RD_DATA) || get_pages(sbi, F2FS_RD_NODE) || get_pages(sbi, F2FS_RD_META) || get_pages(sbi, F2FS_WB_DATA) || get_pages(sbi, F2FS_WB_CP_DATA) ||