• Kent Overstreet's avatar
    bcachefs: Introduce bch2_journal_keys_peek_(upto|slot)() · 5650bb46
    Kent Overstreet authored
    When many journal replay keys have been overwritten,
    bch2_journal_keys_peek() was taking excessively long to scan before it
    found a key to return.
    
    Fix this by introducing bch2_journal_keys_peek_upto() which takes a
    parameter for the end of the range we want, so that we can terminate the
    search much sooner, and replace all uses of bch2_journal_keys_peek()
    with peek_upto() or peek_slot().
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    5650bb46
btree_update_leaf.c 46.2 KB