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>
This commit is contained in:
Kent Overstreet 2020-07-11 15:35:04 -04:00 committed by Kent Overstreet
parent 89fd25be70
commit 1d2ff0a630

View file

@ -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;