summaryrefslogtreecommitdiff
path: root/fs/bcachefs/debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-01 15:10:01 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:12 -0400
commit26609b619fa2301eb7eb5855a7005d99f8a07a73 (patch)
tree40c8e4ec363aad8ede4ffa4e12f7dffb31841a39 /fs/bcachefs/debug.c
parent01a0108f0139a2f6dbace54dd5d592d2d76415c1 (diff)
bcachefs: Make bkey types globally unique
this lets us get rid of a lot of extra switch statements - in a lot of places we dispatch on the btree node type, and then the key type, so this is a nice cleanup across a lot of code. Also improve the on disk format versioning stuff. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/debug.c')
-rw-r--r--fs/bcachefs/debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c
index 0a9efe57d5a9..f15c29878a9e 100644
--- a/fs/bcachefs/debug.c
+++ b/fs/bcachefs/debug.c
@@ -56,7 +56,8 @@ void __bch2_btree_verify(struct bch_fs *c, struct btree *b)
v->btree_id = b->btree_id;
bch2_btree_keys_init(v, &c->expensive_debug_checks);
- if (bch2_btree_pick_ptr(c, b, NULL, &pick) <= 0)
+ if (bch2_bkey_pick_read_device(c, bkey_i_to_s_c(&b->key),
+ NULL, &pick) <= 0)
return;
ca = bch_dev_bkey_exists(c, pick.ptr.dev);
@@ -223,8 +224,7 @@ static ssize_t bch2_read_btree(struct file *file, char __user *buf,
k = bch2_btree_iter_peek(&iter);
while (k.k && !(err = btree_iter_err(k))) {
- bch2_bkey_val_to_text(&PBUF(i->buf), i->c,
- bkey_type(0, i->id), k);
+ bch2_bkey_val_to_text(&PBUF(i->buf), i->c, k);
i->bytes = strlen(i->buf);
BUG_ON(i->bytes >= PAGE_SIZE);
i->buf[i->bytes] = '\n';