bcachefs: bch2_extent_ptr_desired_durability()
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 13 Jun 2023 19:12:04 +0000 (15:12 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:04 +0000 (17:10 -0400)
commit91ecd41b7f02b95279dddcb2193af454efd39497
tree2aa5f8fecb243e4e32ae85a23d94ce631c403f3f
parent253748a26a14ae22123f3ab670ae04eb15fccc2e
bcachefs: bch2_extent_ptr_desired_durability()

This adds a new helper for getting a pointer's durability irrespective
of the device state, and uses it in the the data update path.

This fixes a bug where we do a data update but request 0 replicas to be
allocated, because the replica being rewritten is on a device marked as
failed.

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