diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-10-12 05:28:14 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-10-14 09:23:34 +0300 |
commit | 6ed29fe1cac9745589b7db8de3b5089e3ff591d0 (patch) | |
tree | a671e8c02fa178844caa5f0d748dbdbc23b98dc5 /fs/f2fs | |
parent | 86f33603f8c51537265ff7ac0320638fd2cbdb1b (diff) | |
download | linux-6ed29fe1cac9745589b7db8de3b5089e3ff591d0.tar.xz |
f2fs: don't issue flush in f2fs_flush_device_cache() for nobarrier case
This patch changes f2fs_flush_device_cache() to skip issuing flush for
nobarrier case.
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/segment.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 05ab5ae2b5f7..1596502f7375 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -759,6 +759,9 @@ int f2fs_flush_device_cache(struct f2fs_sb_info *sbi) if (!f2fs_is_multi_device(sbi)) return 0; + if (test_opt(sbi, NOBARRIER)) + return 0; + for (i = 1; i < sbi->s_ndevs; i++) { if (!f2fs_test_bit(i, (char *)&sbi->dirty_device)) continue; |