From: Kent Overstreet Date: Sat, 11 Jul 2020 19:35:04 +0000 (-0400) Subject: bcachefs: Fix extent_ptr_durability() calculation for erasure coded data X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1d2ff0a63049f03bddcc98b195213bbd37e3ab53;p=linux.git bcachefs: Fix extent_ptr_durability() calculation for erasure coded data Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c index 5c1329360d9bd..0fae8d76365eb 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;