• Kent Overstreet's avatar
    bcachefs: Make backpointer fsck wb flush check more rigorous · a56c6171
    Kent Overstreet authored
    backpointers fsck now always runs in rw mode - the btree is being
    modified while it runs, by e.g. copygc, rebalance, the discard worker,
    the invalidate worker.
    
    We could find a missing backpointer, flush the btree write buffer, and
    then on the next iteration find a new key at the exact same position -
    which will most likely need another write buffer flush.
    
    Hence, we have to check for an exact match on last_flushed, not just the
    pos.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    a56c6171
backpointers.c 22.1 KB