Lines Matching refs:clone

273 static void crypt_endio(struct bio *clone);
1683 static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone);
1708 struct bio *clone;
1718 clone = bio_alloc_bioset(cc->dev->bdev, nr_iovecs, io->base_bio->bi_opf,
1720 clone->bi_private = io;
1721 clone->bi_end_io = crypt_endio;
1722 clone->bi_ioprio = io->base_bio->bi_ioprio;
1723 clone->bi_iter.bi_sector = cc->start + io->sector;
1750 crypt_free_buffer_pages(cc, clone);
1751 bio_put(clone);
1759 __bio_add_page(clone, pages, size_to_add, 0);
1764 if (dm_crypt_integrity_io_alloc(io, clone)) {
1765 crypt_free_buffer_pages(cc, clone);
1766 bio_put(clone);
1767 clone = NULL;
1773 return clone;
1776 static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone)
1780 if (clone->bi_vcnt > 0) { /* bio_for_each_folio_all crashes with an empty bio */
1781 bio_for_each_folio_all(fi, clone) {
1867 static void crypt_endio(struct bio *clone)
1869 struct dm_crypt_io *io = clone->bi_private;
1871 unsigned int rw = bio_data_dir(clone);
1872 blk_status_t error = clone->bi_status;
1883 crypt_free_buffer_pages(cc, clone);
1885 bio_put(clone);
1903 struct bio *clone;
1909 clone = crypt_alloc_buffer(io, io->base_bio->bi_iter.bi_size);
1910 if (unlikely(!clone)) {
1914 crypt_convert_init(cc, &io->ctx, clone, clone, io->sector);
1915 io->saved_bi_iter = clone->bi_iter;
1916 dm_submit_bio_remap(io->base_bio, clone);
1926 clone = bio_alloc_clone(cc->dev->bdev, io->base_bio, gfp, &cc->bs);
1927 if (!clone)
1930 clone->bi_iter.bi_sector = cc->start + io->sector;
1931 clone->bi_private = io;
1932 clone->bi_end_io = crypt_endio;
1936 if (dm_crypt_integrity_io_alloc(io, clone)) {
1938 bio_put(clone);
1942 dm_submit_bio_remap(io->base_bio, clone);
1966 struct bio *clone = io->ctx.bio_out;
1968 dm_submit_bio_remap(io->base_bio, clone);
2027 struct bio *clone = io->ctx.bio_out;
2034 crypt_free_buffer_pages(cc, clone);
2035 bio_put(clone);
2040 /* crypt_convert should have filled the clone bio */
2045 dm_submit_bio_remap(io->base_bio, clone);
2120 struct bio *clone;
2130 clone = crypt_alloc_buffer(io, io->base_bio->bi_iter.bi_size);
2131 if (unlikely(!clone)) {
2136 io->ctx.bio_out = clone;
2137 io->ctx.iter_out = clone->bi_iter;
2140 bio_copy_data(clone, io->base_bio);
2141 io->ctx.bio_in = clone;
2142 io->ctx.iter_in = clone->bi_iter;