diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-19 02:42:58 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:36 +0300 |
commit | d4bf5eecd78a90d019b933929a14c91d6d41af62 (patch) | |
tree | 97fb2cc218d2831c2e6f2993605239969c883638 /fs/bcachefs/super.c | |
parent | 615f867c14b2d70efb02dafb8e668d984e74d0e3 (diff) | |
download | linux-d4bf5eecd78a90d019b933929a14c91d6d41af62.tar.xz |
bcachefs: Use bch2_err_str() in error messages
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r-- | fs/bcachefs/super.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index b926fb1b14a9..87742962d6c2 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -25,6 +25,7 @@ #include "debug.h" #include "disk_groups.h" #include "ec.h" +#include "errcode.h" #include "error.h" #include "fs.h" #include "fs-io.h" @@ -1430,7 +1431,7 @@ static int bch2_dev_remove_alloc(struct bch_fs *c, struct bch_dev *ca) bch2_btree_delete_range(c, BTREE_ID_alloc, start, end, BTREE_TRIGGER_NORUN, NULL); if (ret) - bch_err(c, "error %i removing dev alloc info", ret); + bch_err(c, "error removing dev alloc info: %s", bch2_err_str(ret)); return ret; } @@ -1458,7 +1459,7 @@ int bch2_dev_remove(struct bch_fs *c, struct bch_dev *ca, int flags) ret = bch2_dev_data_drop(c, ca->dev_idx, flags); if (ret) { - bch_err(ca, "Remove failed: error %i dropping data", ret); + bch_err(ca, "Remove failed: error dropping data: %s", bch2_err_str(ret)); goto err; } @@ -1470,7 +1471,7 @@ int bch2_dev_remove(struct bch_fs *c, struct bch_dev *ca, int flags) ret = bch2_journal_flush_device_pins(&c->journal, ca->dev_idx); if (ret) { - bch_err(ca, "Remove failed: error %i flushing journal", ret); + bch_err(ca, "Remove failed: error flushing journal: %s", bch2_err_str(ret)); goto err; } @@ -1482,7 +1483,7 @@ int bch2_dev_remove(struct bch_fs *c, struct bch_dev *ca, int flags) ret = bch2_replicas_gc2(c); if (ret) { - bch_err(ca, "Remove failed: error %i from replicas gc", ret); + bch_err(ca, "Remove failed: error from replicas gc: %s", bch2_err_str(ret)); goto err; } @@ -1546,7 +1547,7 @@ int bch2_dev_add(struct bch_fs *c, const char *path) ret = bch2_read_super(path, &opts, &sb); if (ret) { - bch_err(c, "device add error: error reading super: %i", ret); + bch_err(c, "device add error: error reading super: %s", bch2_err_str(ret)); goto err; } @@ -1639,13 +1640,13 @@ have_slot: ret = bch2_trans_mark_dev_sb(c, ca); if (ret) { - bch_err(c, "device add error: error marking new superblock: %i", ret); + bch_err(c, "device add error: error marking new superblock: %s", bch2_err_str(ret)); goto err_late; } ret = bch2_fs_freespace_init(c); if (ret) { - bch_err(c, "device add error: error initializing free space: %i", ret); + bch_err(c, "device add error: error initializing free space: %s", bch2_err_str(ret)); goto err_late; } @@ -1707,8 +1708,8 @@ int bch2_dev_online(struct bch_fs *c, const char *path) ret = bch2_trans_mark_dev_sb(c, ca); if (ret) { - bch_err(c, "error bringing %s online: error %i from bch2_trans_mark_dev_sb", - path, ret); + bch_err(c, "error bringing %s online: error from bch2_trans_mark_dev_sb: %s", + path, bch2_err_str(ret)); goto err; } @@ -1777,7 +1778,7 @@ int bch2_dev_resize(struct bch_fs *c, struct bch_dev *ca, u64 nbuckets) ret = bch2_dev_buckets_resize(c, ca, nbuckets); if (ret) { - bch_err(ca, "Resize error: %i", ret); + bch_err(ca, "Resize error: %s", bch2_err_str(ret)); goto err; } |