Lines Matching refs:crc

156 	bch2_data_update_read_done(&op->write, rbio->pick.crc);
266 ? max(pick->crc.compressed_size, pick->crc.live_size)
396 rbio->pick.crc.offset)) {
479 u64 data_offset = rbio->data_pos.offset - rbio->pick.crc.offset;
486 if (crc_is_compressed(rbio->pick.crc))
500 k.k->p.offset > data_offset + rbio->pick.crc.uncompressed_size)
504 rbio->pick.crc, NULL, &new_crc,
506 rbio->pick.crc.csum_type)) {
548 struct bch_extent_crc_unpacked crc = rbio->pick.crc;
549 struct nonce nonce = extent_nonce(rbio->version, crc);
558 src->bi_iter.bi_size = crc.compressed_size << 9;
565 csum = bch2_checksum_bio(c, crc.csum_type, nonce, src);
566 if (bch2_crc_cmp(csum, rbio->pick.crc.csum) && !c->opts.no_data_io)
582 /* Adjust crc to point to subset of data we want: */
583 crc.offset += rbio->offset_into_extent;
584 crc.live_size = bvec_iter_sectors(rbio->bvec_iter);
586 if (crc_is_compressed(crc)) {
587 ret = bch2_encrypt_bio(c, crc.csum_type, nonce, src);
591 if (bch2_bio_uncompress(c, src, dst, dst_iter, crc) &&
596 nonce = nonce_add(nonce, crc.offset << 9);
597 bio_advance(src, crc.offset << 9);
602 ret = bch2_encrypt_bio(c, crc.csum_type, nonce, src);
616 * rbio->crc:
618 ret = bch2_encrypt_bio(c, crc.csum_type, nonce, src);
648 bch2_csum_err_msg(&buf, crc.csum_type, rbio->pick.crc.csum, csum);
712 crc_is_compressed(rbio->pick.crc) ||
713 bch2_csum_type_is_encryption(rbio->pick.crc.csum_type))
715 else if (rbio->pick.crc.csum_type)
862 if (pick.crc.compressed_size > orig->bio.bi_vcnt * PAGE_SECTORS)
865 iter.bi_size = pick.crc.compressed_size << 9;
874 bch2_can_narrow_extent_crcs(k, pick.crc);
881 if (crc_is_compressed(pick.crc) ||
882 (pick.crc.csum_type != BCH_CSUM_none &&
883 (bvec_iter_sectors(iter) != pick.crc.uncompressed_size ||
884 (bch2_csum_type_is_encryption(pick.crc.csum_type) &&
896 EBUG_ON(crc_is_compressed(pick.crc));
897 EBUG_ON(pick.crc.csum_type &&
898 (bvec_iter_sectors(iter) != pick.crc.uncompressed_size ||
899 bvec_iter_sectors(iter) != pick.crc.live_size ||
900 pick.crc.offset ||
904 pick.ptr.offset += pick.crc.offset +
907 pick.crc.compressed_size = bvec_iter_sectors(iter);
908 pick.crc.uncompressed_size = bvec_iter_sectors(iter);
909 pick.crc.offset = 0;
910 pick.crc.live_size = bvec_iter_sectors(iter);
921 pick.crc.compressed_size << 9);
923 pick.crc.compressed_size << 9;
925 unsigned sectors = pick.crc.compressed_size;
957 EBUG_ON(bio_sectors(&rbio->bio) != pick.crc.compressed_size);