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/bkey_methods.c | |
parent | b0b5bbf99fc269e10d01c2a9873de5a042bdc7f5 (diff) | |
download | linux-88dfe193bd2abd08926c1a0d48b770bb68ac8ccb.tar.gz linux-88dfe193bd2abd08926c1a0d48b770bb68ac8ccb.tar.bz2 linux-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/bkey_methods.c')
-rw-r--r-- | fs/bcachefs/bkey_methods.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/bkey_methods.c b/fs/bcachefs/bkey_methods.c index d9fb1fc81f1e..d9711a27a71e 100644 --- a/fs/bcachefs/bkey_methods.c +++ b/fs/bcachefs/bkey_methods.c @@ -3,6 +3,7 @@ #include "bcachefs.h" #include "backpointers.h" #include "bkey_methods.h" +#include "btree_cache.h" #include "btree_types.h" #include "alloc_background.h" #include "dirent.h" @@ -164,7 +165,7 @@ int __bch2_bkey_invalid(struct bch_fs *c, struct bkey_s_c k, if (flags & BKEY_INVALID_COMMIT && !(bch2_key_types_allowed[type] & BIT_ULL(k.k->type))) { prt_printf(err, "invalid key type for btree %s (%s)", - bch2_btree_ids[type], bch2_bkey_types[k.k->type]); + bch2_btree_id_str(type), bch2_bkey_types[k.k->type]); return -BCH_ERR_invalid_bkey; } |