summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/super-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-02-28 14:38:47 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-14 21:02:16 -0400
commitb31c070407edda710ad087d143353ddd0f2c9499 (patch)
tree759d3274e971a72c5bdcbe73416aeac08ccb6b6b /fs/bcachefs/super-io.c
parentbcachefs: bch2_account_io_completion() (diff)
downloadlinux-b31c070407edda710ad087d143353ddd0f2c9499.tar.gz
linux-b31c070407edda710ad087d143353ddd0f2c9499.zip
bcachefs: Finish bch2_account_io_completion() conversions
More prep work for automatically kicking devices out after too many IO errors. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super-io.c')
-rw-r--r--fs/bcachefs/super-io.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
index 9a204baa3ab9..2fef285cfc1a 100644
--- a/fs/bcachefs/super-io.c
+++ b/fs/bcachefs/super-io.c
@@ -911,16 +911,16 @@ static void write_super_endio(struct bio *bio)
{
struct bch_dev *ca = bio->bi_private;
+ bch2_account_io_success_fail(ca, bio_data_dir(bio), !bio->bi_status);
+
/* XXX: return errors directly */
- if (bch2_dev_io_err_on(bio->bi_status, ca,
- bio_data_dir(bio)
- ? BCH_MEMBER_ERROR_write
- : BCH_MEMBER_ERROR_read,
- "superblock %s error: %s",
+ if (bio->bi_status) {
+ bch_err_dev_ratelimited(ca, "superblock %s error: %s",
str_write_read(bio_data_dir(bio)),
- bch2_blk_status_to_str(bio->bi_status)))
+ bch2_blk_status_to_str(bio->bi_status));
ca->sb_write_error = 1;
+ }
closure_put(&ca->fs->sb_write);
percpu_ref_put(&ca->io_ref);