summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorPark Ju Hyung <qkrwngud825@gmail.com>2019-05-14 15:36:23 +0900
committerJaegeuk Kim <jaegeuk@kernel.org>2019-05-23 07:03:19 -0700
commitf7dfd9f3614419bf690d1438620d1f1c5dc2f1ee (patch)
treea09a852993c42fe372dcd9db4ccc7386029df373 /fs/f2fs
parent8648de2c581eeda7e412d6e38bf19e25bbb795ba (diff)
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 <qkrwngud825@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/f2fs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 3afc8a707ba5..0b6bfe57c21f 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2193,6 +2193,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) ||