Lines Matching full:bytes
14 unsigned int bytes) in dm_bvec_iter_rewind() argument
18 iter->bi_size += bytes; in dm_bvec_iter_rewind()
19 if (bytes <= iter->bi_bvec_done) { in dm_bvec_iter_rewind()
20 iter->bi_bvec_done -= bytes; in dm_bvec_iter_rewind()
24 bytes -= iter->bi_bvec_done; in dm_bvec_iter_rewind()
27 while (idx >= 0 && bytes && bytes > bv[idx].bv_len) { in dm_bvec_iter_rewind()
28 bytes -= bv[idx].bv_len; in dm_bvec_iter_rewind()
32 if (WARN_ONCE(idx < 0 && bytes, in dm_bvec_iter_rewind()
34 iter->bi_size -= bytes; in dm_bvec_iter_rewind()
41 iter->bi_bvec_done = bv[idx].bv_len - bytes; in dm_bvec_iter_rewind()
50 * @bytes_done: number of data bytes to rewind
52 * Description: This function calculates how many integrity bytes the
53 * number of completed data bytes correspond to and rewind the
60 unsigned int bytes = bio_integrity_bytes(bi, bytes_done >> 9); in dm_bio_integrity_rewind() local
63 dm_bvec_iter_rewind(bip->bip_vec, &bip->bip_iter, bytes); in dm_bio_integrity_rewind()
94 static void dm_bio_crypt_rewind(struct bio *bio, unsigned int bytes) in dm_bio_crypt_rewind() argument
99 bytes >> bc->bc_key->data_unit_size_bits); in dm_bio_crypt_rewind()
104 static inline void dm_bio_crypt_rewind(struct bio *bio, unsigned int bytes) in dm_bio_crypt_rewind() argument
111 struct bvec_iter *iter, unsigned int bytes) in dm_bio_rewind_iter() argument
113 iter->bi_sector -= bytes >> 9; in dm_bio_rewind_iter()
117 iter->bi_size += bytes; in dm_bio_rewind_iter()
119 dm_bvec_iter_rewind(bio->bi_io_vec, iter, bytes); in dm_bio_rewind_iter()
123 * dm_bio_rewind - update ->bi_iter of @bio by rewinding @bytes.
125 * @bytes: how many bytes to rewind
132 static void dm_bio_rewind(struct bio *bio, unsigned int bytes) in dm_bio_rewind() argument
135 dm_bio_integrity_rewind(bio, bytes); in dm_bio_rewind()
138 dm_bio_crypt_rewind(bio, bytes); in dm_bio_rewind()
140 dm_bio_rewind_iter(bio, &bio->bi_iter, bytes); in dm_bio_rewind()