summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io_write.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-10-22 11:33:02 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-31 12:18:37 -0400
commit9db2f86060a8e54e80f99e3c3366832ce6a67d76 (patch)
treee83bd22e7eae0465b2098e5b20e605b32afcc7e7 /fs/bcachefs/io_write.c
parent2d39081291470750cc605c917531d7cd85aebf94 (diff)
bcachefs: Check for too-large encoded extents
We don't yet repair (split) them, just check. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io_write.c')
-rw-r--r--fs/bcachefs/io_write.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c
index 4a666f4d2dcc..f7461f60d760 100644
--- a/fs/bcachefs/io_write.c
+++ b/fs/bcachefs/io_write.c
@@ -1092,9 +1092,7 @@ static bool bch2_extent_is_writeable(struct bch_write_op *op,
e = bkey_s_c_to_extent(k);
extent_for_each_ptr_decode(e, p, entry) {
- if (p.crc.csum_type ||
- crc_is_compressed(p.crc) ||
- p.has_ec)
+ if (crc_is_encoded(p.crc) || p.has_ec)
return false;
replicas += bch2_extent_ptr_durability(c, &p);