Lines Matching defs:tio

105 	struct dm_target_io tio;
110 struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone);
111 if (!tio->inside_dm_io)
113 return (char *)bio - offsetof(struct dm_target_io, clone) - offsetof(struct dm_io, tio) - data_size;
121 return (struct bio *)((char *)io + offsetof(struct dm_io, tio) + offsetof(struct dm_target_io, clone));
590 struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone);
591 struct dm_io *io = tio->io;
631 struct dm_target_io *tio;
638 tio = container_of(clone, struct dm_target_io, clone);
639 tio->inside_dm_io = true;
640 tio->io = NULL;
642 io = container_of(tio, struct dm_io, tio);
657 bio_put(&io->tio.clone);
663 struct dm_target_io *tio;
665 if (!ci->io->tio.io) {
667 tio = &ci->io->tio;
673 tio = container_of(clone, struct dm_target_io, clone);
674 tio->inside_dm_io = false;
677 tio->magic = DM_TIO_MAGIC;
678 tio->io = ci->io;
679 tio->ti = ti;
680 tio->target_bio_nr = target_bio_nr;
682 return tio;
685 static void free_tio(struct dm_target_io *tio)
687 if (tio->inside_dm_io)
689 bio_put(&tio->clone);
991 struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone);
992 struct dm_io *io = tio->io;
993 struct mapped_device *md = tio->io->md;
994 dm_endio_fn endio = tio->ti->type->end_io;
1022 int r = endio(tio->ti, bio, &error);
1038 if (unlikely(swap_bios_limit(tio->ti, bio))) {
1043 free_tio(tio);
1249 * <-------------- *tio->len_ptr --------------->
1266 struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone);
1272 BUG_ON(bi_size > *tio->len_ptr);
1275 *tio->len_ptr -= bi_size - n_sectors;
1296 static blk_qc_t __map_bio(struct dm_target_io *tio)
1300 struct bio *clone = &tio->clone;
1301 struct dm_io *io = tio->io;
1302 struct dm_target *ti = tio->ti;
1338 free_tio(tio);
1346 free_tio(tio);
1366 static int clone_bio(struct dm_target_io *tio, struct bio *bio,
1369 struct bio *clone = &tio->clone;
1379 if (unlikely(!dm_target_has_integrity(tio->ti->type) &&
1380 !dm_target_passes_integrity(tio->ti->type))) {
1382 dm_device_name(tio->io->md),
1383 tio->ti->type->name);
1404 struct dm_target_io *tio;
1411 tio = alloc_tio(ci, ti, 0, GFP_NOIO);
1412 bio_list_add(blist, &tio->clone);
1423 tio = alloc_tio(ci, ti, bio_nr, try ? GFP_NOIO : GFP_NOWAIT);
1424 if (!tio)
1427 bio_list_add(blist, &tio->clone);
1435 tio = container_of(bio, struct dm_target_io, clone);
1436 free_tio(tio);
1442 struct dm_target_io *tio, unsigned *len)
1444 struct bio *clone = &tio->clone;
1446 tio->len_ptr = len;
1452 return __map_bio(tio);
1460 struct dm_target_io *tio;
1465 tio = container_of(bio, struct dm_target_io, clone);
1466 (void) __clone_and_map_simple_bio(ci, tio, len);
1507 struct dm_target_io *tio;
1510 tio = alloc_tio(ci, ti, 0, GFP_NOIO);
1511 tio->len_ptr = len;
1512 r = clone_bio(tio, bio, sector, *len);
1514 free_tio(tio);
1517 (void) __map_bio(tio);
2932 io_front_pad = roundup(front_pad, __alignof__(struct dm_io)) + offsetof(struct dm_io, tio);