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
83 ret = dm_get_device(ti, argv[0], dm_table_get_mode(ti->table), in get_stripe()
97 static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) in stripe_ctr() argument
107 ti->error = "Not enough arguments"; in stripe_ctr()
112 ti->error = "Invalid stripe count"; in stripe_ctr()
117 ti->error = "Invalid chunk_size"; in stripe_ctr()
121 width = ti->len; in stripe_ctr()
123 ti->error = "Target length not divisible by " in stripe_ctr()
130 ti->error = "Target length not divisible by " in stripe_ctr()
139 ti->error = "Not enough destinations " in stripe_ctr()
146 ti->error = "Memory allocation for striped context " in stripe_ctr()
154 sc->ti = ti; in stripe_ctr()
163 r = dm_set_target_max_io_len(ti, chunk_size); in stripe_ctr()
169 ti->num_flush_bios = stripes; in stripe_ctr()
170 ti->num_discard_bios = stripes; in stripe_ctr()
171 ti->num_write_same_bios = stripes; in stripe_ctr()
185 r = get_stripe(ti, sc, i, argv); in stripe_ctr()
187 ti->error = "Couldn't parse stripe destination"; in stripe_ctr()
189 dm_put_device(ti, sc->stripe[i].dev); in stripe_ctr()
196 ti->private = sc; in stripe_ctr()
201 static void stripe_dtr(struct dm_target *ti) in stripe_dtr() argument
204 struct stripe_c *sc = (struct stripe_c *) ti->private; in stripe_dtr()
207 dm_put_device(ti, sc->stripe[i].dev); in stripe_dtr()
216 sector_t chunk = dm_target_offset(sc->ti, sector); in stripe_map_sector()
283 static int stripe_map(struct dm_target *ti, struct bio *bio) in stripe_map() argument
285 struct stripe_c *sc = ti->private; in stripe_map()
324 static void stripe_status(struct dm_target *ti, status_type_t type, in stripe_status() argument
327 struct stripe_c *sc = (struct stripe_c *) ti->private; in stripe_status()
354 static int stripe_end_io(struct dm_target *ti, struct bio *bio, int error) in stripe_end_io() argument
358 struct stripe_c *sc = ti->private; in stripe_end_io()
391 static int stripe_iterate_devices(struct dm_target *ti, in stripe_iterate_devices() argument
394 struct stripe_c *sc = ti->private; in stripe_iterate_devices()
399 ret = fn(ti, sc->stripe[i].dev, in stripe_iterate_devices()
407 static void stripe_io_hints(struct dm_target *ti, in stripe_io_hints() argument
410 struct stripe_c *sc = ti->private; in stripe_io_hints()