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

bcachefs: Fix iterating of journal keys within a btree node

Extent btrees no longer have weird special behaviour for min_key.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 11f6ed36
......@@ -183,17 +183,12 @@ void bch2_btree_and_journal_iter_init_node_iter(struct btree_and_journal_iter *i
struct journal_keys *journal_keys,
struct btree *b)
{
struct bpos start = b->data->min_key;
if (btree_node_type_is_extents(b->c.btree_id))
start = bkey_successor(start);
memset(iter, 0, sizeof(*iter));
iter->b = b;
bch2_btree_node_iter_init_from_start(&iter->node_iter, iter->b);
bch2_journal_iter_init(&iter->journal, journal_keys,
b->c.btree_id, b->c.level, start);
b->c.btree_id, b->c.level, b->data->min_key);
}
/* sort and dedup all keys in the journal: */
......
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