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

bcachefs: Fix bch2_btree_iter_peek_slot() assertion

This assertion is checking that what the iterator points to is
consistent with iter->real_pos, and since it's an internal btree
ordering property it should be using bpos_cmp.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 618b1c0e
......@@ -1859,7 +1859,7 @@ struct bkey_s_c bch2_btree_iter_peek_slot(struct btree_iter *iter)
switch (btree_iter_type(iter)) {
case BTREE_ITER_KEYS:
k = btree_iter_level_peek_all(iter, &iter->l[0]);
EBUG_ON(k.k && bkey_deleted(k.k) && bkey_cmp(k.k->p, iter->pos) == 0);
EBUG_ON(k.k && bkey_deleted(k.k) && bpos_cmp(k.k->p, iter->pos) == 0);
break;
case BTREE_ITER_CACHED:
ck = (void *) iter->l[0].b;
......
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