Skip to contentSkip to conversation

f2fs: print kernel message if filesystem is inconsistent

PATCH New Chao Yu 1 participant 1 message Jun 18, 2019 F2FS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 f2fs: print kernel message if filesystem is inconsistent

As Pavel reported, once we detect filesystem inconsistency in f2fs_inplace_write_data(), it will be better to print kernel message as we did in other places.

---
 fs/f2fs/segment.c | 2 ++
 1 file changed, 2 insertions(+)
fs/f2fs/segment.c +2 -0
index 492e9e70dfc7..d32e38025e26 100644
@@ -3247,6 +3247,8 @@ int f2fs_inplace_write_data(struct f2fs_io_info *fio)
 
 	if (!IS_DATASEG(get_seg_entry(sbi, segno)->type)) {
 		set_sbi_flag(sbi, SBI_NEED_FSCK);
+		f2fs_warn(sbi->sb, "%s: incorrect segment(%u) type, run fsck to fix.",
+			  __func__, segno);
 		return -EFAULT;
 	}
 
Signature · 8 lines
2.18.0.rc1



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel