bcachefs: deallocate_extra_replicas()
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 20 Nov 2023 23:23:26 +0000 (18:23 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 24 Nov 2023 08:03:47 +0000 (03:03 -0500)
commit0af8a06a4ce823e380385cdd9538cdd968a1ffae
treee10e6aec12d250e00efe88feea2eb58285dff6c7
parent8a443d3ea1327fea5ac3be77d2e39ebe35bfe9cf
bcachefs: deallocate_extra_replicas()

When allocating from devices with different durability, we might end up
with more replicas than required; this changes
bch2_alloc_sectors_start() to check for this, and drop replicas that
aren't needed to hit the number of replicas requested.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_foreground.c