summaryrefslogtreecommitdiff
path: root/fs/bcachefs/ec.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-06-20 13:49:25 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:04 -0400
commit1bb3c2a9747c404d23012088fbefb4499b884415 (patch)
tree450da8adf0cea75a7dda044f4c4b7c3d413c9da0 /fs/bcachefs/ec.c
parenta83e108fc1964b8273c6f51cc62588ee774a5a48 (diff)
bcachefs: New error message helpers
Add two new helpers for printing error messages with __func__ and bch2_err_str(): - bch_err_fn - bch_err_msg Also kill the old error strings in the recovery path, which were causing us to incorrectly report memory allocation failures - they're not needed anymore. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r--fs/bcachefs/ec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index b7e3889b114b..0c5c291e844e 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -798,7 +798,7 @@ static void ec_stripe_delete_work(struct work_struct *work)
ret = commit_do(&trans, NULL, NULL, BTREE_INSERT_NOFAIL,
ec_stripe_delete(&trans, idx));
if (ret) {
- bch_err(c, "%s: err %s", __func__, bch2_err_str(ret));
+ bch_err_fn(c, ret);
break;
}
}
@@ -1845,7 +1845,7 @@ int bch2_stripes_read(struct bch_fs *c)
bch2_trans_exit(&trans);
if (ret)
- bch_err(c, "error reading stripes: %i", ret);
+ bch_err_fn(c, ret);
return ret;
}