summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/compress.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-02-10 17:04:08 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-14 21:02:14 -0400
commit1ccbcd320577271c85d9a5bfbdd3394cb9baadb3 (patch)
tree44450a7787571ff40b316edf16398047ba6ae092 /fs/bcachefs/compress.c
parentbcachefs: metadata_target is not an inode option (diff)
downloadlinux-1ccbcd320577271c85d9a5bfbdd3394cb9baadb3.tar.gz
linux-1ccbcd320577271c85d9a5bfbdd3394cb9baadb3.zip
bcachefs: bch2_write_op_error() now prints info about data update
A user has been seeing the "error verifying existing checksum while rewriting existing data (memory corruption?)" error. This generally indicates a hardware issue (and that may be the case here), but it might also indicate a bug, in which case we need more information to look for patterns. Reported-by: Roland Vet <vet.roland@protonmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/compress.c')
-rw-r--r--fs/bcachefs/compress.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c
index 114bf2f3879f..31467f77930f 100644
--- a/fs/bcachefs/compress.c
+++ b/fs/bcachefs/compress.c
@@ -271,8 +271,8 @@ int bch2_bio_uncompress_inplace(struct bch_write_op *op,
if (crc->uncompressed_size << 9 > c->opts.encoded_extent_max ||
crc->compressed_size << 9 > c->opts.encoded_extent_max) {
struct printbuf buf = PRINTBUF;
- bch2_write_op_error(&buf, op);
- prt_printf(&buf, "error rewriting existing data: extent too big");
+ bch2_write_op_error(&buf, op, op->pos.offset,
+ "extent too big to decompress");
bch_err_ratelimited(c, "%s", buf.buf);
printbuf_exit(&buf);
return -EIO;
@@ -283,8 +283,8 @@ int bch2_bio_uncompress_inplace(struct bch_write_op *op,
if (__bio_uncompress(c, bio, data.b, *crc)) {
if (!c->opts.no_data_io) {
struct printbuf buf = PRINTBUF;
- bch2_write_op_error(&buf, op);
- prt_printf(&buf, "error rewriting existing data: decompression error");
+ bch2_write_op_error(&buf, op, op->pos.offset,
+ "decompression error");
bch_err_ratelimited(c, "%s", buf.buf);
printbuf_exit(&buf);
}