Lines Matching refs:ti

27 static void cleanup_unstripe(struct unstripe_c *uc, struct dm_target *ti)
30 dm_put_device(ti, uc->dev);
38 static int unstripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
46 ti->error = "Invalid number of arguments";
52 ti->error = "Memory allocation for unstriped context failed";
57 ti->error = "Invalid stripe count";
62 ti->error = "Invalid chunk_size";
67 ti->error = "Invalid stripe number";
72 ti->error = "Please provide stripe between [0, # of stripes]";
76 if (dm_get_device(ti, argv[3], dm_table_get_mode(ti->table), &uc->dev)) {
77 ti->error = "Couldn't get striped device";
82 ti->error = "Invalid striped device offset";
91 tmp_len = ti->len;
93 ti->error = "Target length not divisible by chunk size";
97 if (dm_set_target_max_io_len(ti, uc->chunk_size)) {
98 ti->error = "Failed to set max io len";
102 ti->private = uc;
105 cleanup_unstripe(uc, ti);
109 static void unstripe_dtr(struct dm_target *ti)
111 struct unstripe_c *uc = ti->private;
113 cleanup_unstripe(uc, ti);
116 static sector_t map_to_core(struct dm_target *ti, struct bio *bio)
118 struct unstripe_c *uc = ti->private;
134 static int unstripe_map(struct dm_target *ti, struct bio *bio)
136 struct unstripe_c *uc = ti->private;
139 bio->bi_iter.bi_sector = map_to_core(ti, bio) + uc->physical_start;
144 static void unstripe_status(struct dm_target *ti, status_type_t type,
147 struct unstripe_c *uc = ti->private;
162 static int unstripe_iterate_devices(struct dm_target *ti,
165 struct unstripe_c *uc = ti->private;
167 return fn(ti, uc->dev, uc->physical_start, ti->len, data);
170 static void unstripe_io_hints(struct dm_target *ti,
173 struct unstripe_c *uc = ti->private;