Commit 0bd143fd authored by Kent Overstreet's avatar Kent Overstreet

bcache: Fix a bug recovering from unclean shutdown

The code to fixup incorrect bucket prios incorrectly did not skip btree node
freeing keys
Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
parent 27201cfd
...@@ -1726,9 +1726,9 @@ static int bch_btree_check_recurse(struct btree *b, struct btree_op *op, ...@@ -1726,9 +1726,9 @@ static int bch_btree_check_recurse(struct btree *b, struct btree_op *op,
!ptr_stale(b->c, k, i)) { !ptr_stale(b->c, k, i)) {
g->gen = PTR_GEN(k, i); g->gen = PTR_GEN(k, i);
if (b->level) if (b->level && bkey_cmp(k, &ZERO_KEY))
g->prio = BTREE_PRIO; g->prio = BTREE_PRIO;
else if (g->prio == BTREE_PRIO) else if (!b->level && g->prio == BTREE_PRIO)
g->prio = INITIAL_PRIO; g->prio = INITIAL_PRIO;
} }
} }
......
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