bcachefs: KEY_TYPE_error now counts towards i_sectors
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 29 Sep 2023 19:49:16 +0000 (15:49 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:16 +0000 (17:10 -0400)
commitbe47e0ba4fc92bd065ac0b7ad345913eea1bc6fc
tree286a6ffcc762ddc549d3fa8b8e34a1216a4d3656
parent6929d5e74e473fb8b15875c627f7c5ad963c1889
bcachefs: KEY_TYPE_error now counts towards i_sectors

KEY_TYPE_error is used when all replicas in an extent are marked as
failed; it indicates that data was present, but has been lost.

So that i_sectors doesn't change when replacing extents with
KEY_TYPE_error, we now have to count error keys as allocations - this
fixes fsck errors later.

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