summaryrefslogtreecommitdiff
path: root/fs/bcachefs/compress.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-16 22:31:19 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:08 -0400
commit970a5096acc223e90c9fad853575c87ee85b02ae (patch)
tree9780b8c68b658cc3d1c8e8b0fcdf3e8e1b72e9ed /fs/bcachefs/compress.c
parent20e6d9a8d4050220f4e0a0195d102abaf2c8439b (diff)
bcachefs: Suppresss various error messages in no_data_io mode
We commonly use no_data_io mode when debugging filesystem metadata dumps, where data checksum/compression errors are expected and unimportant - this patch suppresses these. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/compress.c')
-rw-r--r--fs/bcachefs/compress.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c
index 560214c15da3..c9ca7cce55f8 100644
--- a/fs/bcachefs/compress.c
+++ b/fs/bcachefs/compress.c
@@ -240,7 +240,8 @@ int bch2_bio_uncompress_inplace(struct bch_fs *c, struct bio *bio,
data = __bounce_alloc(c, dst_len, WRITE);
if (__bio_uncompress(c, bio, data.b, *crc)) {
- bch_err(c, "error rewriting existing data: decompression error");
+ if (!c->opts.no_data_io)
+ bch_err(c, "error rewriting existing data: decompression error");
bio_unmap_or_unbounce(c, data);
return -EIO;
}