Skip to contentSkip to conversation

f2fs: fix to be aware discard IO in is_idle()

PATCH Superseded Chao Yu 1 participant 1 message Oct 24, 2018 F2FS file system

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 f2fs: fix to be aware discard IO in is_idle()

This patch adds missing in-flight discard IO count check in is_idle().

---
 fs/f2fs/f2fs.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/f2fs/f2fs.h +2 -1
index 6af2a105529d..c8005d271de0 100644
@@ -2156,7 +2156,8 @@ static inline bool is_idle(struct f2fs_sb_info *sbi, int type)
 {
 	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))
+		get_pages(sbi, F2FS_WB_CP_DATA) ||
+		atomic_read(&SM_I(sbi)->dcc_info->issing_discard))
 		return false;
 	return f2fs_time_over(sbi, type);
 }
Signature · 1 line
2.18.0.rc1