summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/checksum.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-17 04:31:19 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:10:08 +0200
commit970a5096acc223e90c9fad853575c87ee85b02ae (patch)
tree9780b8c68b658cc3d1c8e8b0fcdf3e8e1b72e9ed /fs/bcachefs/checksum.c
parentbcachefs: Fix lookup_inode_for_snapshot() (diff)
downloadlinux-970a5096acc223e90c9fad853575c87ee85b02ae.tar.xz
linux-970a5096acc223e90c9fad853575c87ee85b02ae.zip
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/checksum.c')
-rw-r--r--fs/bcachefs/checksum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/checksum.c b/fs/bcachefs/checksum.c
index 20d0e8afc1ad..bf03d42c6138 100644
--- a/fs/bcachefs/checksum.c
+++ b/fs/bcachefs/checksum.c
@@ -426,7 +426,7 @@ int bch2_rechecksum_bio(struct bch_fs *c, struct bio *bio,
merged = bch2_checksum_bio(c, crc_old.csum_type,
extent_nonce(version, crc_old), bio);
- if (bch2_crc_cmp(merged, crc_old.csum)) {
+ if (bch2_crc_cmp(merged, crc_old.csum) && !c->opts.no_data_io) {
bch_err(c, "checksum error in bch2_rechecksum_bio() (memory corruption or bug?)\n"
"expected %0llx:%0llx got %0llx:%0llx (old type %s new type %s)",
crc_old.csum.hi,