diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-20 05:49:08 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-31 19:18:37 +0300 |
commit | 88dfe193bd2abd08926c1a0d48b770bb68ac8ccb (patch) | |
tree | 5b607e0e484b43fb05743251ff4e2c2146eed962 /fs/bcachefs/bbpos.h | |
parent | b0b5bbf99fc269e10d01c2a9873de5a042bdc7f5 (diff) | |
download | linux-88dfe193bd2abd08926c1a0d48b770bb68ac8ccb.tar.xz |
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/bbpos.h')
-rw-r--r-- | fs/bcachefs/bbpos.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/bbpos.h b/fs/bcachefs/bbpos.h index 1fbed1f8378d..0038bc28ba8c 100644 --- a/fs/bcachefs/bbpos.h +++ b/fs/bcachefs/bbpos.h @@ -3,6 +3,7 @@ #define _BCACHEFS_BBPOS_H #include "bkey_methods.h" +#include "btree_cache.h" struct bbpos { enum btree_id btree; @@ -40,7 +41,7 @@ static inline struct bbpos bbpos_successor(struct bbpos pos) static inline void bch2_bbpos_to_text(struct printbuf *out, struct bbpos pos) { - prt_str(out, bch2_btree_ids[pos.btree]); + prt_str(out, bch2_btree_id_str(pos.btree)); prt_char(out, ':'); bch2_bpos_to_text(out, pos.pos); } |