Lines Matching refs:ti
38 struct dm_target *ti; member
54 dm_table_event(sc->ti->table); in trigger_event()
73 static int get_stripe(struct dm_target *ti, struct stripe_c *sc, in get_stripe() argument
82 if (dm_get_device(ti, argv[0], dm_table_get_mode(ti->table), in get_stripe()
95 static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) in stripe_ctr() argument
105 ti->error = "Not enough arguments"; in stripe_ctr()
110 ti->error = "Invalid stripe count"; in stripe_ctr()
115 ti->error = "Invalid chunk_size"; in stripe_ctr()
119 width = ti->len; in stripe_ctr()
121 ti->error = "Target length not divisible by " in stripe_ctr()
128 ti->error = "Target length not divisible by " in stripe_ctr()
137 ti->error = "Not enough destinations " in stripe_ctr()
144 ti->error = "Memory allocation for striped context " in stripe_ctr()
152 sc->ti = ti; in stripe_ctr()
161 r = dm_set_target_max_io_len(ti, chunk_size); in stripe_ctr()
167 ti->num_flush_bios = stripes; in stripe_ctr()
168 ti->num_discard_bios = stripes; in stripe_ctr()
169 ti->num_write_same_bios = stripes; in stripe_ctr()
183 r = get_stripe(ti, sc, i, argv); in stripe_ctr()
185 ti->error = "Couldn't parse stripe destination"; in stripe_ctr()
187 dm_put_device(ti, sc->stripe[i].dev); in stripe_ctr()
194 ti->private = sc; in stripe_ctr()
199 static void stripe_dtr(struct dm_target *ti) in stripe_dtr() argument
202 struct stripe_c *sc = (struct stripe_c *) ti->private; in stripe_dtr()
205 dm_put_device(ti, sc->stripe[i].dev); in stripe_dtr()
214 sector_t chunk = dm_target_offset(sc->ti, sector); in stripe_map_sector()
281 static int stripe_map(struct dm_target *ti, struct bio *bio) in stripe_map() argument
283 struct stripe_c *sc = ti->private; in stripe_map()
322 static void stripe_status(struct dm_target *ti, status_type_t type, in stripe_status() argument
325 struct stripe_c *sc = (struct stripe_c *) ti->private; in stripe_status()
352 static int stripe_end_io(struct dm_target *ti, struct bio *bio, int error) in stripe_end_io() argument
356 struct stripe_c *sc = ti->private; in stripe_end_io()
389 static int stripe_iterate_devices(struct dm_target *ti, in stripe_iterate_devices() argument
392 struct stripe_c *sc = ti->private; in stripe_iterate_devices()
397 ret = fn(ti, sc->stripe[i].dev, in stripe_iterate_devices()
405 static void stripe_io_hints(struct dm_target *ti, in stripe_io_hints() argument
408 struct stripe_c *sc = ti->private; in stripe_io_hints()
415 static int stripe_merge(struct dm_target *ti, struct bvec_merge_data *bvm, in stripe_merge() argument
418 struct stripe_c *sc = ti->private; in stripe_merge()