Lines Matching refs:ti

28 static void cleanup_unstripe(struct unstripe_c *uc, struct dm_target *ti)
31 dm_put_device(ti, uc->dev);
39 static int unstripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
47 ti->error = "Invalid number of arguments";
53 ti->error = "Memory allocation for unstriped context failed";
58 ti->error = "Invalid stripe count";
63 ti->error = "Invalid chunk_size";
68 ti->error = "Invalid stripe number";
73 ti->error = "Please provide stripe between [0, # of stripes]";
77 if (dm_get_device(ti, argv[3], dm_table_get_mode(ti->table), &uc->dev)) {
78 ti->error = "Couldn't get striped device";
83 ti->error = "Invalid striped device offset";
92 tmp_len = ti->len;
94 ti->error = "Target length not divisible by chunk size";
98 if (dm_set_target_max_io_len(ti, uc->chunk_size)) {
99 ti->error = "Failed to set max io len";
103 ti->private = uc;
106 cleanup_unstripe(uc, ti);
110 static void unstripe_dtr(struct dm_target *ti)
112 struct unstripe_c *uc = ti->private;
114 cleanup_unstripe(uc, ti);
117 static sector_t map_to_core(struct dm_target *ti, struct bio *bio)
119 struct unstripe_c *uc = ti->private;
135 static int unstripe_map(struct dm_target *ti, struct bio *bio)
137 struct unstripe_c *uc = ti->private;
140 bio->bi_iter.bi_sector = map_to_core(ti, bio) + uc->physical_start;
145 static void unstripe_status(struct dm_target *ti, status_type_t type,
148 struct unstripe_c *uc = ti->private;
167 static int unstripe_iterate_devices(struct dm_target *ti,
170 struct unstripe_c *uc = ti->private;
172 return fn(ti, uc->dev, uc->physical_start, ti->len, data);
175 static void unstripe_io_hints(struct dm_target *ti,
178 struct unstripe_c *uc = ti->private;