mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
bcachefs: bch2_btree_id_to_text()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
ae4fb17e86
commit
11169d9983
@ -1257,6 +1257,14 @@ const char *bch2_btree_id_str(enum btree_id btree)
|
||||
return btree < BTREE_ID_NR ? __bch2_btree_ids[btree] : "(unknown)";
|
||||
}
|
||||
|
||||
void bch2_btree_id_to_text(struct printbuf *out, enum btree_id btree)
|
||||
{
|
||||
if (btree < BTREE_ID_NR)
|
||||
prt_str(out, __bch2_btree_ids[btree]);
|
||||
else
|
||||
prt_printf(out, "(unknown btree %u)", btree);
|
||||
}
|
||||
|
||||
void bch2_btree_pos_to_text(struct printbuf *out, struct bch_fs *c, const struct btree *b)
|
||||
{
|
||||
prt_printf(out, "%s level %u/%u\n ",
|
||||
|
@ -132,6 +132,8 @@ static inline struct btree *btree_node_root(struct bch_fs *c, struct btree *b)
|
||||
}
|
||||
|
||||
const char *bch2_btree_id_str(enum btree_id);
|
||||
void bch2_btree_id_to_text(struct printbuf *, 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 btree_cache *);
|
||||
|
Loading…
Reference in New Issue
Block a user