Lines Matching refs:clone

237 static void crypt_endio(struct bio *clone);
1642 static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone);
1664 struct bio *clone; in crypt_alloc_buffer() local
1674 clone = bio_alloc_bioset(cc->dev->bdev, nr_iovecs, io->base_bio->bi_opf, in crypt_alloc_buffer()
1676 clone->bi_private = io; in crypt_alloc_buffer()
1677 clone->bi_end_io = crypt_endio; in crypt_alloc_buffer()
1684 crypt_free_buffer_pages(cc, clone); in crypt_alloc_buffer()
1685 bio_put(clone); in crypt_alloc_buffer()
1692 bio_add_page(clone, page, len, 0); in crypt_alloc_buffer()
1698 if (dm_crypt_integrity_io_alloc(io, clone)) { in crypt_alloc_buffer()
1699 crypt_free_buffer_pages(cc, clone); in crypt_alloc_buffer()
1700 bio_put(clone); in crypt_alloc_buffer()
1701 clone = NULL; in crypt_alloc_buffer()
1707 return clone; in crypt_alloc_buffer()
1710 static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone) in crypt_free_buffer_pages() argument
1715 bio_for_each_segment_all(bv, clone, iter_all) { in crypt_free_buffer_pages()
1803 static void crypt_endio(struct bio *clone) in crypt_endio() argument
1805 struct dm_crypt_io *io = clone->bi_private; in crypt_endio()
1807 unsigned rw = bio_data_dir(clone); in crypt_endio()
1814 crypt_free_buffer_pages(cc, clone); in crypt_endio()
1816 error = clone->bi_status; in crypt_endio()
1817 bio_put(clone); in crypt_endio()
1835 struct bio *clone; in kcryptd_io_read() local
1843 clone = bio_alloc_clone(cc->dev->bdev, io->base_bio, gfp, &cc->bs); in kcryptd_io_read()
1844 if (!clone) in kcryptd_io_read()
1846 clone->bi_private = io; in kcryptd_io_read()
1847 clone->bi_end_io = crypt_endio; in kcryptd_io_read()
1851 clone->bi_iter.bi_sector = cc->start + io->sector; in kcryptd_io_read()
1853 if (dm_crypt_integrity_io_alloc(io, clone)) { in kcryptd_io_read()
1855 bio_put(clone); in kcryptd_io_read()
1859 dm_submit_bio_remap(io->base_bio, clone); in kcryptd_io_read()
1883 struct bio *clone = io->ctx.bio_out; in kcryptd_io_write() local
1885 dm_submit_bio_remap(io->base_bio, clone); in kcryptd_io_write()
1944 struct bio *clone = io->ctx.bio_out; in kcryptd_crypt_write_io_submit() local
1951 crypt_free_buffer_pages(cc, clone); in kcryptd_crypt_write_io_submit()
1952 bio_put(clone); in kcryptd_crypt_write_io_submit()
1960 clone->bi_iter.bi_sector = cc->start + io->sector; in kcryptd_crypt_write_io_submit()
1964 dm_submit_bio_remap(io->base_bio, clone); in kcryptd_crypt_write_io_submit()
2042 struct bio *clone; in kcryptd_crypt_write_convert() local
2053 clone = crypt_alloc_buffer(io, io->base_bio->bi_iter.bi_size); in kcryptd_crypt_write_convert()
2054 if (unlikely(!clone)) { in kcryptd_crypt_write_convert()
2059 io->ctx.bio_out = clone; in kcryptd_crypt_write_convert()
2060 io->ctx.iter_out = clone->bi_iter; in kcryptd_crypt_write_convert()
2062 sector += bio_sectors(clone); in kcryptd_crypt_write_convert()