diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-29 22:49:16 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:10:16 +0300 |
commit | be47e0ba4fc92bd065ac0b7ad345913eea1bc6fc (patch) | |
tree | 286a6ffcc762ddc549d3fa8b8e34a1216a4d3656 /fs | |
parent | 6929d5e74e473fb8b15875c627f7c5ad963c1889 (diff) | |
download | linux-be47e0ba4fc92bd065ac0b7ad345913eea1bc6fc.tar.xz |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/extents.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h index db1863165d62..978ae5e7e8b1 100644 --- a/fs/bcachefs/extents.h +++ b/fs/bcachefs/extents.h @@ -520,6 +520,7 @@ static inline bool bkey_extent_is_allocation(const struct bkey *k) case KEY_TYPE_reflink_v: case KEY_TYPE_inline_data: case KEY_TYPE_indirect_inline_data: + case KEY_TYPE_error: return true; default: return false; |