Commit a4461c8a authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Print out name of bkey type

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 0c04f5eb
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "quota.h" #include "quota.h"
#include "xattr.h" #include "xattr.h"
const char * const bch_bkey_types[] = { const char * const bch2_bkey_types[] = {
#define x(name, nr) #name, #define x(name, nr) #name,
BCH_BKEY_TYPES() BCH_BKEY_TYPES()
#undef x #undef x
...@@ -159,7 +159,8 @@ void bch2_bpos_to_text(struct printbuf *out, struct bpos pos) ...@@ -159,7 +159,8 @@ void bch2_bpos_to_text(struct printbuf *out, struct bpos pos)
void bch2_bkey_to_text(struct printbuf *out, const struct bkey *k) void bch2_bkey_to_text(struct printbuf *out, const struct bkey *k)
{ {
pr_buf(out, "u64s %u type %u ", k->u64s, k->type); pr_buf(out, "u64s %u type %s ", k->u64s,
bch2_bkey_types[k->type]);
bch2_bpos_to_text(out, k->p); bch2_bpos_to_text(out, k->p);
...@@ -174,8 +175,6 @@ void bch2_val_to_text(struct printbuf *out, struct bch_fs *c, ...@@ -174,8 +175,6 @@ void bch2_val_to_text(struct printbuf *out, struct bch_fs *c,
if (likely(ops->val_to_text)) if (likely(ops->val_to_text))
ops->val_to_text(out, c, k); ops->val_to_text(out, c, k);
else
pr_buf(out, " %s", bch_bkey_types[k.k->type]);
} }
void bch2_bkey_val_to_text(struct printbuf *out, struct bch_fs *c, void bch2_bkey_val_to_text(struct printbuf *out, struct bch_fs *c,
......
...@@ -9,7 +9,7 @@ struct btree; ...@@ -9,7 +9,7 @@ struct btree;
struct bkey; struct bkey;
enum btree_node_type; enum btree_node_type;
extern const char * const bch_bkey_types[]; extern const char * const bch2_bkey_types[];
enum merge_result { enum merge_result {
BCH_MERGE_NOMERGE, BCH_MERGE_NOMERGE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment