summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_cache.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-10-19 22:49:08 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-31 12:18:37 -0400
commit88dfe193bd2abd08926c1a0d48b770bb68ac8ccb (patch)
tree5b607e0e484b43fb05743251ff4e2c2146eed962 /fs/bcachefs/btree_cache.h
parentb0b5bbf99fc269e10d01c2a9873de5a042bdc7f5 (diff)
downloadlinux-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/btree_cache.h')
-rw-r--r--fs/bcachefs/btree_cache.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_cache.h b/fs/bcachefs/btree_cache.h
index 1e562b6efa62..cfb80b201d61 100644
--- a/fs/bcachefs/btree_cache.h
+++ b/fs/bcachefs/btree_cache.h
@@ -123,8 +123,9 @@ static inline struct btree *btree_node_root(struct bch_fs *c, struct btree *b)
return bch2_btree_id_root(c, b->c.btree_id)->b;
}
-void bch2_btree_node_to_text(struct printbuf *, struct bch_fs *,
- const struct btree *);
+const char *bch2_btree_id_str(enum btree_id);
+void bch2_btree_pos_to_text(struct printbuf *, struct bch_fs *, const struct btree *);
+void bch2_btree_node_to_text(struct printbuf *, struct bch_fs *, const struct btree *);
void bch2_btree_cache_to_text(struct printbuf *, const struct bch_fs *);
#endif /* _BCACHEFS_BTREE_CACHE_H */