• Kent Overstreet's avatar
    bcachefs: New on disk format: Backpointers · a8c752bb
    Kent Overstreet authored
    This patch adds backpointers: we now have a reverse index from device
    and offset on that device (specifically, offset within a bucket) back to
    btree nodes and (non cached) data extents.
    
    The first 40 backpointers within a bucket are stored in the alloc key;
    after that backpointers spill over to the next backpointers btree. This
    is to help avoid performance regressions from additional btree updates
    on large streaming workloads.
    
    This patch adds all the code for creating, checking and repairing
    backpointers. The next patch in the series is going to use backpointers
    for copygc - finally getting rid of the need to scan all extents to do
    copygc.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    a8c752bb
alloc_foreground.c 33.9 KB