• Kent Overstreet's avatar
    bcachefs: BTREE_ITER_WITH_JOURNAL · 5222a460
    Kent Overstreet authored
    This adds a new btree iterator flag, BTREE_ITER_WITH_JOURNAL, that is
    automatically enabled when initializing a btree iterator before journal
    replay has completed - it overlays the contents of the journal with the
    btree.
    
    This lets us delete bch2_btree_and_journal_walk() and just use the
    normal btree iterator interface instead - which also lets us delete a
    significant amount of duplicated code.
    
    Note that BTREE_ITER_WITH_JOURNAL is still unoptimized in this patch -
    we're redoing the binary search over keys in the journal every time we
    call bch2_btree_iter_peek().
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    5222a460
btree_update_interior.c 56.8 KB