Skip to content

Commit 62d73df

Browse files
author
Kent Overstreet
committed
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: Kent Overstreet <[email protected]>
1 parent db18ef1 commit 62d73df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/io_write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ static int bch2_write_decrypt(struct bch_write_op *op)
795795
* checksum:
796796
*/
797797
csum = bch2_checksum_bio(c, op->crc.csum_type, nonce, &op->wbio.bio);
798-
if (bch2_crc_cmp(op->crc.csum, csum))
798+
if (bch2_crc_cmp(op->crc.csum, csum) && !c->opts.no_data_io)
799799
return -EIO;
800800

801801
ret = bch2_encrypt_bio(c, op->crc.csum_type, nonce, &op->wbio.bio);

0 commit comments

Comments
 (0)