Commit d7dd3fb8 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix rereplicate when we already have a cached pointer



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>
parent 7c909f65
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment