• Kent Overstreet's avatar
    bcachefs: Fix rereplicate when we already have a cached pointer · d7dd3fb8
    Kent Overstreet authored
    When we need to add more replicas to an extent, it might be the case
    that we already have a replica on every device, but some of them are
    cached.
    
    This patch fixes a bug where we'd spin on that extent because the write
    path fails to find a device we can allocate from: we allow allocating
    from devices that already have cached replicas on them, and change
    bch2_data_update_index_update() to drop the cached replica if needed.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    d7dd3fb8
data_update.c 10.2 KB