Commit 62d73dfc authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix no_data_io mode checksum check

In no_data_io mode, we expect data checksums to be wrong - don't want to
spew the log with them.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent db18ef1a
...@@ -795,7 +795,7 @@ static int bch2_write_decrypt(struct bch_write_op *op) ...@@ -795,7 +795,7 @@ static int bch2_write_decrypt(struct bch_write_op *op)
* checksum: * checksum:
*/ */
csum = bch2_checksum_bio(c, op->crc.csum_type, nonce, &op->wbio.bio); csum = bch2_checksum_bio(c, op->crc.csum_type, nonce, &op->wbio.bio);
if (bch2_crc_cmp(op->crc.csum, csum)) if (bch2_crc_cmp(op->crc.csum, csum) && !c->opts.no_data_io)
return -EIO; return -EIO;
ret = bch2_encrypt_bio(c, op->crc.csum_type, nonce, &op->wbio.bio); ret = bch2_encrypt_bio(c, op->crc.csum_type, nonce, &op->wbio.bio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment