Commit 6ed29fe1 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

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: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 86f33603
...@@ -759,6 +759,9 @@ int f2fs_flush_device_cache(struct f2fs_sb_info *sbi) ...@@ -759,6 +759,9 @@ int f2fs_flush_device_cache(struct f2fs_sb_info *sbi)
if (!f2fs_is_multi_device(sbi)) if (!f2fs_is_multi_device(sbi))
return 0; return 0;
if (test_opt(sbi, NOBARRIER))
return 0;
for (i = 1; i < sbi->s_ndevs; i++) { for (i = 1; i < sbi->s_ndevs; i++) {
if (!f2fs_test_bit(i, (char *)&sbi->dirty_device)) if (!f2fs_test_bit(i, (char *)&sbi->dirty_device))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment