• Kent Overstreet's avatar
    bcachefs: Fixes for replicas tracking · df5d4dae
    Kent Overstreet authored
    The continue statement in bch2_trans_mark_extent() was wrong - by
    bailing out early, we'd be constructing the wrong replicas list to
    update. Also, the assertion in update_replicas() was wrong - due to
    rounding with compressed extents, it is possible for sectors to be 0
    sometimes.
    
    Also, change extent_to_replicas() in replicas.c to match the replicas
    list we construct in buckets.c.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    df5d4dae
replicas.c 24.6 KB