Lines Matching refs:clone
968 static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone);
990 struct bio *clone; in crypt_alloc_buffer() local
1001 clone = bio_alloc_bioset(GFP_NOIO, nr_iovecs, cc->bs); in crypt_alloc_buffer()
1002 if (!clone) in crypt_alloc_buffer()
1005 clone_init(io, clone); in crypt_alloc_buffer()
1012 crypt_free_buffer_pages(cc, clone); in crypt_alloc_buffer()
1013 bio_put(clone); in crypt_alloc_buffer()
1020 bvec = &clone->bi_io_vec[clone->bi_vcnt++]; in crypt_alloc_buffer()
1025 clone->bi_iter.bi_size += len; in crypt_alloc_buffer()
1034 return clone; in crypt_alloc_buffer()
1037 static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone) in crypt_free_buffer_pages() argument
1042 bio_for_each_segment_all(bv, clone, i) { in crypt_free_buffer_pages()
1102 static void crypt_endio(struct bio *clone) in crypt_endio() argument
1104 struct dm_crypt_io *io = clone->bi_private; in crypt_endio()
1106 unsigned rw = bio_data_dir(clone); in crypt_endio()
1113 crypt_free_buffer_pages(cc, clone); in crypt_endio()
1115 error = clone->bi_error; in crypt_endio()
1116 bio_put(clone); in crypt_endio()
1129 static void clone_init(struct dm_crypt_io *io, struct bio *clone) in clone_init() argument
1133 clone->bi_private = io; in clone_init()
1134 clone->bi_end_io = crypt_endio; in clone_init()
1135 clone->bi_bdev = cc->dev->bdev; in clone_init()
1136 clone->bi_rw = io->base_bio->bi_rw; in clone_init()
1142 struct bio *clone; in kcryptd_io_read() local
1150 clone = bio_clone_fast(io->base_bio, gfp, cc->bs); in kcryptd_io_read()
1151 if (!clone) in kcryptd_io_read()
1156 clone_init(io, clone); in kcryptd_io_read()
1157 clone->bi_iter.bi_sector = cc->start + io->sector; in kcryptd_io_read()
1159 generic_make_request(clone); in kcryptd_io_read()
1183 struct bio *clone = io->ctx.bio_out; in kcryptd_io_write() local
1185 generic_make_request(clone); in kcryptd_io_write()
1247 struct bio *clone = io->ctx.bio_out; in kcryptd_crypt_write_io_submit() local
1254 crypt_free_buffer_pages(cc, clone); in kcryptd_crypt_write_io_submit()
1255 bio_put(clone); in kcryptd_crypt_write_io_submit()
1263 clone->bi_iter.bi_sector = cc->start + io->sector; in kcryptd_crypt_write_io_submit()
1266 generic_make_request(clone); in kcryptd_crypt_write_io_submit()
1291 struct bio *clone; in kcryptd_crypt_write_convert() local
1302 clone = crypt_alloc_buffer(io, io->base_bio->bi_iter.bi_size); in kcryptd_crypt_write_convert()
1303 if (unlikely(!clone)) { in kcryptd_crypt_write_convert()
1308 io->ctx.bio_out = clone; in kcryptd_crypt_write_convert()
1309 io->ctx.iter_out = clone->bi_iter; in kcryptd_crypt_write_convert()
1311 sector += bio_sectors(clone); in kcryptd_crypt_write_convert()