diff options
| author | Chao Yu <yuchao0@huawei.com> | 2019-06-18 17:59:03 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-07-12 18:34:58 -0700 |
| commit | ebdaeafa138be7328a592c334e177fa37b1e8ad3 (patch) | |
| tree | 1b13fc93c5a42bbb2228c65e50df44035ba5bf10 /fs | |
| parent | 12e065d8d6a9592959edd27d445529cbed413777 (diff) | |
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')
| -rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 875c5e2483b5..5ee3d91cf359 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -3319,6 +3319,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; } |
