bcachefs: Fix iterating of journal keys within a btree node

Extent btrees no longer have weird special behaviour for min_key.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2020-03-30 18:11:13 -04:00 committed by Kent Overstreet
parent 11f6ed36b9
commit b58a181d5c

View File

@ -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: */