diff options
author | Chao Yu <chao@kernel.org> | 2022-09-28 17:38:54 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-10-04 22:31:45 +0200 |
commit | 95fa90c9e5a7f14c2497d5b032544478c9377c3a (patch) | |
tree | c5a868cfae65b1d969a30a1cdb750a4813f5cad1 /fs/f2fs/gc.c | |
parent | f2fs: support recording stop_checkpoint reason into super_block (diff) | |
download | linux-95fa90c9e5a7f14c2497d5b032544478c9377c3a.tar.xz linux-95fa90c9e5a7f14c2497d5b032544478c9377c3a.zip |
f2fs: support recording errors into superblock
This patch supports to record detail reason of FSCORRUPTED error into
f2fs_super_block.s_errors[].
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r-- | fs/f2fs/gc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 6e42dad0ac2d..d36bcb23ccfe 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1164,6 +1164,7 @@ static int ra_data_block(struct inode *inode, pgoff_t index) if (unlikely(!f2fs_is_valid_blkaddr(sbi, dn.data_blkaddr, DATA_GENERIC_ENHANCE_READ))) { err = -EFSCORRUPTED; + f2fs_handle_error(sbi, ERROR_INVALID_BLKADDR); goto put_page; } goto got_it; @@ -1182,6 +1183,7 @@ static int ra_data_block(struct inode *inode, pgoff_t index) if (unlikely(!f2fs_is_valid_blkaddr(sbi, dn.data_blkaddr, DATA_GENERIC_ENHANCE))) { err = -EFSCORRUPTED; + f2fs_handle_error(sbi, ERROR_INVALID_BLKADDR); goto put_page; } got_it: |