Commit 4ce41957 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Optimize bch2_btree_iter_verify_level()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 5c1ec980
...@@ -492,9 +492,9 @@ static void bch2_btree_iter_verify_cached(struct btree_iter *iter) ...@@ -492,9 +492,9 @@ static void bch2_btree_iter_verify_cached(struct btree_iter *iter)
static void bch2_btree_iter_verify_level(struct btree_iter *iter, static void bch2_btree_iter_verify_level(struct btree_iter *iter,
unsigned level) unsigned level)
{ {
struct btree_iter_level *l = &iter->l[level]; struct btree_iter_level *l;
struct btree_node_iter tmp = l->iter; struct btree_node_iter tmp;
bool locked = btree_node_locked(iter, level); bool locked;
struct bkey_packed *p, *k; struct bkey_packed *p, *k;
char buf1[100], buf2[100], buf3[100]; char buf1[100], buf2[100], buf3[100];
const char *msg; const char *msg;
...@@ -502,6 +502,10 @@ static void bch2_btree_iter_verify_level(struct btree_iter *iter, ...@@ -502,6 +502,10 @@ static void bch2_btree_iter_verify_level(struct btree_iter *iter,
if (!bch2_debug_check_iterators) if (!bch2_debug_check_iterators)
return; return;
l = &iter->l[level];
tmp = l->iter;
locked = btree_node_locked(iter, level);
if (btree_iter_type(iter) == BTREE_ITER_CACHED) { if (btree_iter_type(iter) == BTREE_ITER_CACHED) {
if (!level) if (!level)
bch2_btree_iter_verify_cached(iter); bch2_btree_iter_verify_cached(iter);
......
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