summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-06-18 17:59:03 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2019-07-02 15:40:41 -0700
commit2d821c12176bc1184701d548c987b2e2a39429ed (patch)
tree08f1245730420101c5c572146a6926de6d0b2fd3 /fs/f2fs
parentdcbb4c10e6d9693cc9d6fa493b4d130b66a60c7d (diff)
downloadlinux-2d821c12176bc1184701d548c987b2e2a39429ed.tar.bz2
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. Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Chao Yu <yuchao0@huawei.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 4a6133cc9112..ee96e6fb1a50 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -3242,6 +3242,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, "%s: incorrect segment(%u) type, run fsck to fix.",
+ __func__, segno);
return -EFAULT;
}