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/alloc_background.c | |
parent | b0b5bbf99fc269e10d01c2a9873de5a042bdc7f5 (diff) | |
download | linux-stable-88dfe193bd2abd08926c1a0d48b770bb68ac8ccb.tar.gz linux-stable-88dfe193bd2abd08926c1a0d48b770bb68ac8ccb.tar.bz2 linux-stable-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/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 2d516207e223..455ee0b47f31 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -727,7 +727,7 @@ static int bch2_bucket_do_index(struct btree_trans *trans, "incorrect key when %s %s:%llu:%llu:0 (got %s should be %s)\n" " for %s", set ? "setting" : "clearing", - bch2_btree_ids[btree], + bch2_btree_id_str(btree), iter.pos.inode, iter.pos.offset, bch2_bkey_types[old.k->type], @@ -1245,7 +1245,7 @@ static noinline_for_stack int __bch2_check_discard_freespace_key(struct btree_tr if (fsck_err_on(!bch2_dev_bucket_exists(c, pos), c, "entry in %s btree for nonexistant dev:bucket %llu:%llu", - bch2_btree_ids[iter->btree_id], pos.inode, pos.offset)) + bch2_btree_id_str(iter->btree_id), pos.inode, pos.offset)) goto delete; a = bch2_alloc_to_v4(alloc_k, &a_convert); @@ -1255,7 +1255,7 @@ static noinline_for_stack int __bch2_check_discard_freespace_key(struct btree_tr genbits != alloc_freespace_genbits(*a)), c, "%s\n incorrectly set at %s:%llu:%llu:0 (free %u, genbits %llu should be %llu)", (bch2_bkey_val_to_text(&buf, c, alloc_k), buf.buf), - bch2_btree_ids[iter->btree_id], + bch2_btree_id_str(iter->btree_id), iter->pos.inode, iter->pos.offset, a->data_type == state, |