diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-20 13:49:25 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:04 -0400 |
commit | 1bb3c2a9747c404d23012088fbefb4499b884415 (patch) | |
tree | 450da8adf0cea75a7dda044f4c4b7c3d413c9da0 /fs/bcachefs/buckets.c | |
parent | a83e108fc1964b8273c6f51cc62588ee774a5a48 (diff) | |
download | lwn-1bb3c2a9747c404d23012088fbefb4499b884415.tar.gz lwn-1bb3c2a9747c404d23012088fbefb4499b884415.zip |
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/buckets.c')
-rw-r--r-- | fs/bcachefs/buckets.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index fbe0cd0a7de3..d770dc949661 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -1988,7 +1988,10 @@ static int __bch2_trans_mark_dev_sb(struct btree_trans *trans, int bch2_trans_mark_dev_sb(struct bch_fs *c, struct bch_dev *ca) { - return bch2_trans_run(c, __bch2_trans_mark_dev_sb(&trans, ca)); + int ret = bch2_trans_run(c, __bch2_trans_mark_dev_sb(&trans, ca)); + if (ret) + bch_err_fn(c, ret); + return ret; } /* Disk reservations: */ |