Lines Matching refs:ti

30 	 * ti->len and give more flexibility in altering size and
57 struct dm_target *ti;
100 static struct raid_set *context_alloc(struct dm_target *ti, struct raid_type *raid_type, unsigned raid_devs)
107 ti->error = "Insufficient number of devices";
111 sectors_per_dev = ti->len;
114 ti->error = "Target length not divisible by number of data devices";
120 ti->error = "Cannot allocate raid context";
126 rs->ti = ti;
157 dm_put_device(rs->ti, rs->dev[i].meta_dev);
163 dm_put_device(rs->ti, rs->dev[i].data_dev);
206 ret = dm_get_device(rs->ti, argv[0],
207 dm_table_get_mode(rs->ti->table),
209 rs->ti->error = "RAID metadata device lookup failure";
221 rs->ti->error = "Drive designated for rebuild not specified";
225 rs->ti->error = "No data device supplied with metadata device";
232 ret = dm_get_device(rs->ti, argv[1],
233 dm_table_get_mode(rs->ti->table),
236 rs->ti->error = "RAID device lookup failure";
267 rs->ti->error = "RAID device lookup failure";
280 * Ensure that (ti->len/region_size < 2^21) - required by MD bitmap.
286 unsigned long min_region_size = rs->ti->len / (1 << 21);
304 if (region_size > rs->ti->len) {
305 rs->ti->error = "Supplied region size is too large";
312 rs->ti->error = "Supplied region size is too small";
317 rs->ti->error = "Region size is not a power of 2";
322 rs->ti->error = "Region size is smaller than the chunk size";
366 rs->ti->error = "Bad chunk size";
373 rs->ti->error = "Chunk size must be a power of 2";
376 rs->ti->error = "Chunk size value is too small";
423 rs->ti->error = "Wrong number of raid parameters given";
429 rs->ti->error = "Bad numerical argument given in raid params";
439 rs->ti->error = "Too many rebuild devices specified for given RAID type";
443 rs->ti->error = "Invalid rebuild index given";
451 rs->ti->error = "write_mostly option is only valid for RAID1";
455 rs->ti->error = "Invalid write_mostly drive index given";
461 rs->ti->error = "max_write_behind option is only valid for RAID1";
472 rs->ti->error = "Max write-behind limit out of range";
479 rs->ti->error = "daemon sleep period out of range";
493 rs->ti->error = "Inappropriate argument: stripe_cache";
497 rs->ti->error = "Bad stripe_cache size";
503 rs->ti->error = "min_recovery_rate out of range";
510 rs->ti->error = "max_recovery_rate out of range";
519 rs->ti->error = "Unable to parse RAID parameters";
528 rs->ti->split_io = rs->md.chunk_sectors;
530 rs->ti->split_io = region_size;
533 rs->ti->split_io = rs->md.chunk_sectors;
535 rs->ti->split_io = region_size;
548 dm_table_event(rs->ti->table);
794 rs->ti->error = "Cannot change device "
851 static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs)
871 ti->error = "Failed to load superblock";
883 ti->error = "Unable to assemble array: Invalid superblocks";
903 static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv)
912 ti->error = "Too few arguments";
919 ti->error = "Unrecognised raid_type";
927 ti->error = "Cannot understand number of RAID parameters";
935 ti->error = "Arguments do not agree with counts given";
941 ti->error = "Cannot understand number of raid devices";
945 rs = context_alloc(ti, rt, (unsigned)num_raid_devs);
959 ti->error = "Supplied RAID devices does not match the count given";
968 ret = analyse_superblocks(ti, rs);
973 ti->private = rs;
981 ti->error = "Fail to run raid array";
986 dm_table_add_target_callbacks(ti->table, &rs->callbacks);
997 static void raid_dtr(struct dm_target *ti)
999 struct raid_set *rs = ti->private;
1006 static int raid_map(struct dm_target *ti, struct bio *bio, union map_info *map_context)
1008 struct raid_set *rs = ti->private;
1016 static int raid_status(struct dm_target *ti, status_type_t type,
1019 struct raid_set *rs = ti->private;
1156 static int raid_iterate_devices(struct dm_target *ti, iterate_devices_callout_fn fn, void *data)
1158 struct raid_set *rs = ti->private;
1164 ret = fn(ti,
1173 static void raid_io_hints(struct dm_target *ti, struct queue_limits *limits)
1175 struct raid_set *rs = ti->private;
1183 static void raid_presuspend(struct dm_target *ti)
1185 struct raid_set *rs = ti->private;
1190 static void raid_postsuspend(struct dm_target *ti)
1192 struct raid_set *rs = ti->private;
1197 static void raid_resume(struct dm_target *ti)
1199 struct raid_set *rs = ti->private;