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

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: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 07358a82
......@@ -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
}
......
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