diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-11-12 00:55:44 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-11-26 15:53:56 -0800 |
commit | fef4129ec2e691a8411584c8bd126a35d0870298 (patch) | |
tree | 3b65f5c6dbdd7594e7b90361b948f6f211a196dd /fs/f2fs | |
parent | 02b16d0a34a188a21d08be52b37505e531aa558a (diff) | |
download | linux-fef4129ec2e691a8411584c8bd126a35d0870298.tar.bz2 |
f2fs: fix to be aware discard/preflush/dio command in is_idle()
This patch adds missing in-flight discard/preflush/dio command count
check in is_idle().
Signed-off-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.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index bebf26c67061..df10394bd806 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2158,7 +2158,11 @@ 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) || + get_pages(sbi, F2FS_DIO_READ) || + get_pages(sbi, F2FS_DIO_WRITE) || + atomic_read(&SM_I(sbi)->dcc_info->issing_discard) || + atomic_read(&SM_I(sbi)->fcc_info->issing_flush)) return false; return f2fs_time_over(sbi, type); } |