summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2022-09-28 23:38:53 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2022-10-04 13:31:44 -0700
commita9cfee0ef98e99c8b1951dfd1d57a88580354d0d (patch)
tree203825dc4c216998dd91f4bdcc4c121d259c9056 /fs/f2fs/data.c
parentca7efd71c3dffd5442b448dd553a903425222597 (diff)
downloadlinux-a9cfee0ef98e99c8b1951dfd1d57a88580354d0d.tar.bz2
f2fs: support recording stop_checkpoint reason into super_block
This patch supports to record stop_checkpoint error into f2fs_super_block.s_stop_reason[]. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index a921cd40db78..3f2210e54577 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -333,7 +333,8 @@ static void f2fs_write_end_io(struct bio *bio)
mempool_free(page, sbi->write_io_dummy);
if (unlikely(bio->bi_status))
- f2fs_stop_checkpoint(sbi, true);
+ f2fs_stop_checkpoint(sbi, true,
+ STOP_CP_REASON_WRITE_FAIL);
continue;
}
@@ -349,7 +350,8 @@ static void f2fs_write_end_io(struct bio *bio)
if (unlikely(bio->bi_status)) {
mapping_set_error(page->mapping, -EIO);
if (type == F2FS_WB_CP_DATA)
- f2fs_stop_checkpoint(sbi, true);
+ f2fs_stop_checkpoint(sbi, true,
+ STOP_CP_REASON_WRITE_FAIL);
}
f2fs_bug_on(sbi, page->mapping == NODE_MAPPING(sbi) &&