summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bset.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-11-26 17:18:23 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:32 -0400
commitc201e2d97615e7dc6f2f99dcdb8bf8d64657b761 (patch)
tree43ffd047b96901fe4c575f1becabefa491a99d91 /fs/bcachefs/bset.c
parent07358a82bb36ff77d6a1e2e0e7fc9920b96a64d4 (diff)
bcachefs: Fix bch2_verify_insert_pos()
We were calling __btree_node_key_to_offset() on a key that wasn't in the btree node. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bset.c')
-rw-r--r--fs/bcachefs/bset.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index 189a187bc080..a0bd6af67190 100644
--- a/fs/bcachefs/bset.c
+++ b/fs/bcachefs/bset.c
@@ -241,10 +241,9 @@ void bch2_verify_insert_pos(struct btree *b, struct bkey_packed *where,
bch2_bkey_to_text(&PBUF(buf2), &k2);
panic("prev > insert:\n"
- "prev key %5u %s\n"
- "insert key %5u %s\n",
- __btree_node_key_to_offset(b, prev), buf1,
- __btree_node_key_to_offset(b, insert), buf2);
+ "prev key %s\n"
+ "insert key %s\n",
+ buf1, buf2);
}
#endif
#if 0
@@ -263,10 +262,9 @@ void bch2_verify_insert_pos(struct btree *b, struct bkey_packed *where,
bch2_bkey_to_text(&PBUF(buf2), &k2);
panic("insert > next:\n"
- "insert key %5u %s\n"
- "next key %5u %s\n",
- __btree_node_key_to_offset(b, insert), buf1,
- __btree_node_key_to_offset(b, next), buf2);
+ "insert key %s\n"
+ "next key %s\n",
+ buf1, buf2);
}
#endif
}