diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-19 22:49:08 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-31 12:18:37 -0400 |
commit | 88dfe193bd2abd08926c1a0d48b770bb68ac8ccb (patch) | |
tree | 5b607e0e484b43fb05743251ff4e2c2146eed962 /fs/bcachefs/recovery.c | |
parent | b0b5bbf99fc269e10d01c2a9873de5a042bdc7f5 (diff) | |
download | lwn-88dfe193bd2abd08926c1a0d48b770bb68ac8ccb.tar.gz lwn-88dfe193bd2abd08926c1a0d48b770bb68ac8ccb.zip |
bcachefs: bch2_btree_id_str()
Since we can run with unknown btree IDs, we can't directly index btree
IDs into fixed size arrays.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r-- | fs/bcachefs/recovery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 1ad12ae38053..55663253c9d3 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -182,7 +182,7 @@ static int bch2_journal_replay(struct bch_fs *c) bch2_journal_replay_key(trans, k)); if (ret) { bch_err(c, "journal replay: error while replaying key at btree %s level %u: %s", - bch2_btree_ids[k->btree_id], k->level, bch2_err_str(ret)); + bch2_btree_id_str(k->btree_id), k->level, bch2_err_str(ret)); goto err; } } @@ -367,7 +367,7 @@ static int read_btree_roots(struct bch_fs *c) __fsck_err(c, btree_id_is_alloc(i) ? FSCK_CAN_IGNORE : 0, "invalid btree root %s", - bch2_btree_ids[i]); + bch2_btree_id_str(i)); if (i == BTREE_ID_alloc) c->sb.compat &= ~(1ULL << BCH_COMPAT_alloc_info); } @@ -376,7 +376,7 @@ static int read_btree_roots(struct bch_fs *c) if (ret) { fsck_err(c, "error reading btree root %s", - bch2_btree_ids[i]); + bch2_btree_id_str(i)); if (btree_id_is_alloc(i)) c->sb.compat &= ~(1ULL << BCH_COMPAT_alloc_info); ret = 0; |