• Kent Overstreet's avatar
    bcachefs: Optimize bucket reuse · e3ad2937
    Kent Overstreet authored
    If the btree updates pointing to a bucket were never flushed by the
    journal before the bucket became empty again, we can reuse the bucket
    without a journal flush.
    
    This tweaks the tracking of journal sequence numbers in alloc keys to
    implement this optimization: now, we only update the journal sequence
    number in alloc keys on transitions to and from empty. When a bucket
    becomes empty, we check if we can tell the journal not to flush entries
    starting from when the bucket was used.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    e3ad2937
buckets.c 57.1 KB