• Kent Overstreet's avatar
    bcachefs: Rework btree iterator lifetimes · 64bc0011
    Kent Overstreet authored
    The btree_trans struct needs to memoize/cache btree iterators, so that
    on transaction restart we don't have to completely redo btree lookups,
    and so that we can do them all at once in the correct order when the
    transaction had to restart to avoid a deadlock.
    
    This switches the btree iterator lookups to work based on iterator
    position, instead of trying to match them up based on the stack trace.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    64bc0011
btree_iter.c 51.9 KB