bcachefs: Rework __bch2_data_update_index_update()
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 4 Mar 2023 08:21:34 +0000 (03:21 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:56 +0000 (17:09 -0400)
commit57c723de7d4c592ab3a38e77d414d0021e8483ee
tree87724b7eaf0dfbaaedbb45abbf1a6eb3e389f3f0
parent702ffea204840455e4f2d918538c39cc5c59666b
bcachefs: Rework __bch2_data_update_index_update()

This makes some improvements to the logic for adding/removing replicas,
as part of the larger erasure coding improvements. We now directly
consider number of replicas desired for the given inode, and
extent/pointer durability: this ensures that the extent ends up with the
desired number of replicas when we're replacing multiple pointers with
one that has higher durability (e.g. erasure coded).

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