summaryrefslogtreecommitdiff
path: root/fs/bcachefs/extents.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-07-11 22:35:04 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:42 +0300
commit1d2ff0a63049f03bddcc98b195213bbd37e3ab53 (patch)
treea646d368dffe13ff80b246ae67d3a5f8f4ccf903 /fs/bcachefs/extents.c
parent89fd25be70b4e3fc540d4cf591a02898470f1ef0 (diff)
downloadlinux-1d2ff0a63049f03bddcc98b195213bbd37e3ab53.tar.xz
bcachefs: Fix extent_ptr_durability() calculation for erasure coded data
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/extents.c')
-rw-r--r--fs/bcachefs/extents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c
index 5c1329360d9b..0fae8d76365e 100644
--- a/fs/bcachefs/extents.c
+++ b/fs/bcachefs/extents.c
@@ -723,7 +723,7 @@ static unsigned bch2_extent_ptr_durability(struct bch_fs *c,
if (WARN_ON(!s))
goto out;
- durability = max_t(unsigned, durability, s->nr_redundant);
+ durability += s->nr_redundant;
}
out:
return durability;