Commit 01eed771 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Tighten up btree_path assertions

Currently seeing a very rare and difficult to explain btree_path
inconsistency - this patch adds assertions to the only place that seems
to be missing them.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent db346e71
......@@ -1020,6 +1020,7 @@ static inline struct bkey_s_c btree_path_level_peek(struct btree_trans *trans,
path->pos = k.k ? k.k->p : l->b->key.k.p;
trans->paths_sorted = false;
bch2_btree_path_verify_level(trans, path, l - path->l);
return k;
}
......@@ -1033,6 +1034,7 @@ static inline struct bkey_s_c btree_path_level_prev(struct btree_trans *trans,
path->pos = k.k ? k.k->p : l->b->data->min_key;
trans->paths_sorted = false;
bch2_btree_path_verify_level(trans, path, l - path->l);
return k;
}
......@@ -1661,7 +1663,7 @@ static int btree_path_traverse_one(struct btree_trans *trans,
int __must_check bch2_btree_path_traverse(struct btree_trans *trans,
struct btree_path *path, unsigned flags)
{
if (IS_ENABLED(CONFIG_BCACHEFS_DEBUG)) {
if (0 && IS_ENABLED(CONFIG_BCACHEFS_DEBUG)) {
unsigned restart_probability_bits = 4 << min(trans->restart_count, 32U);
u64 max = ~(~0ULL << restart_probability_bits);
......
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