• Kent Overstreet's avatar
    bcachefs: Fix an issue with inconsistent btree writes after unclean shutdown · 9dd89a05
    Kent Overstreet authored
    After unclean shutdown, btree writes may have completed on one device
    and not others - and this inconsistency could lead us to writing new
    bsets with a gap in our btree node in one of our replicas.
    
    Fortunately, this is only an issue with bsets that are newer than the
    most recent journal flush, and we already have a mechanism for detecting
    and blacklisting those. We just need to make sure to start new btree
    writes after the most recent _non_ blacklisted bset.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    9dd89a05
btree_io.c 51.4 KB