Skip to contentSkip to conversation

f2fs: don't issue flush in f2fs_flush_device_cache() for nobarrier case

PATCH New Chao Yu 1 participant 1 message Oct 12, 2020 F2FS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 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.

---
 fs/f2fs/segment.c | 3 +++
 1 file changed, 3 insertions(+)
fs/f2fs/segment.c +3 -0
index 13ecd2c2c361..f14499632b45 100644
@@ -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;
Signature · 1 line
2.26.2