Skip to content

Commit

Permalink
bcachefs: Fix no_data_io mode checksum check
Browse files Browse the repository at this point in the history
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 <kent.overstreet@linux.dev>
  • Loading branch information
Kent Overstreet committed Nov 15, 2023
1 parent db18ef1 commit 62d73df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/bcachefs/io_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ static int bch2_write_decrypt(struct bch_write_op *op)
* checksum:
*/
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;

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

0 comments on commit 62d73df

Please sign in to comment.