Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcc6b712 authored by Park Ju Hyung's avatar Park Ju Hyung Committed by Jaegeuk Kim
Browse files

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: default avatarPark Ju Hyung <qkrwngud825@gmail.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent afc60025
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2194,6 +2194,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) ||