Lines Matching refs:ti
231 struct dm_target *ti; member
516 rs->ti->error = "Invalid flags combination"; in rs_check_for_valid_flags()
703 struct gendisk *gendisk = dm_disk(dm_table_get_md(rs->ti->table)); in rs_set_capacity()
736 static struct raid_set *raid_set_alloc(struct dm_target *ti, struct raid_type *raid_type, in raid_set_alloc() argument
743 ti->error = "Insufficient number of devices"; in raid_set_alloc()
749 ti->error = "Cannot allocate raid context"; in raid_set_alloc()
755 ti->error = "Cannot initialize raid context"; in raid_set_alloc()
762 rs->ti = ti; in raid_set_alloc()
795 dm_put_device(rs->ti, rs->journal_dev.dev); in raid_set_free()
800 dm_put_device(rs->ti, rs->dev[i].meta_dev); in raid_set_free()
803 dm_put_device(rs->ti, rs->dev[i].data_dev); in raid_set_free()
858 r = dm_get_device(rs->ti, arg, dm_table_get_mode(rs->ti->table), in parse_dev_params()
861 rs->ti->error = "RAID metadata device lookup failure"; in parse_dev_params()
867 rs->ti->error = "Failed to allocate superblock page"; in parse_dev_params()
879 rs->ti->error = "Drive designated for rebuild not specified"; in parse_dev_params()
884 rs->ti->error = "No data device supplied with metadata device"; in parse_dev_params()
891 r = dm_get_device(rs->ti, arg, dm_table_get_mode(rs->ti->table), in parse_dev_params()
894 rs->ti->error = "RAID device lookup failure"; in parse_dev_params()
927 rs->ti->error = "Unable to rebuild drive while array is not in-sync"; in parse_dev_params()
946 unsigned long min_region_size = rs->ti->len / (1 << 21); in validate_region_size()
968 if (region_size > rs->ti->len) { in validate_region_size()
969 rs->ti->error = "Supplied region size is too large"; in validate_region_size()
976 rs->ti->error = "Supplied region size is too small"; in validate_region_size()
981 rs->ti->error = "Region size is not a power of 2"; in validate_region_size()
986 rs->ti->error = "Region size is smaller than the chunk size"; in validate_region_size()
1146 rs->ti->error = "Bad numerical argument given for chunk_size"; in parse_raid_params()
1159 rs->ti->error = "Chunk size must be a power of 2"; in parse_raid_params()
1162 rs->ti->error = "Chunk size value is too small"; in parse_raid_params()
1196 rs->ti->error = "Not enough raid parameters given"; in parse_raid_params()
1202 rs->ti->error = "Only one 'nosync' argument allowed"; in parse_raid_params()
1209 rs->ti->error = "Only one 'sync' argument allowed"; in parse_raid_params()
1216 rs->ti->error = "Only one 'raid10_use_new_sets' argument allowed"; in parse_raid_params()
1225 rs->ti->error = "Wrong number of raid parameters given"; in parse_raid_params()
1235 rs->ti->error = "Only one 'raid10_format' argument pair allowed"; in parse_raid_params()
1239 rs->ti->error = "'raid10_format' is an invalid parameter for this RAID type"; in parse_raid_params()
1244 rs->ti->error = "Invalid 'raid10_format' value given"; in parse_raid_params()
1256 rs->ti->error = "Only one raid4/5/6 set journaling device allowed"; in parse_raid_params()
1260 rs->ti->error = "'journal_dev' is an invalid parameter for this RAID type"; in parse_raid_params()
1263 r = dm_get_device(rs->ti, arg, dm_table_get_mode(rs->ti->table), in parse_raid_params()
1266 rs->ti->error = "raid4/5/6 journal device lookup failure"; in parse_raid_params()
1275 rs->ti->error = "No space for raid4/5/6 journal"; in parse_raid_params()
1288 rs->ti->error = "raid4/5/6 'journal_mode' is invalid without 'journal_dev'"; in parse_raid_params()
1292 rs->ti->error = "Only one raid4/5/6 'journal_mode' argument allowed"; in parse_raid_params()
1297 rs->ti->error = "Invalid 'journal_mode' argument"; in parse_raid_params()
1308 rs->ti->error = "Bad numerical argument given in raid params"; in parse_raid_params()
1319 rs->ti->error = "Invalid rebuild index given"; in parse_raid_params()
1324 rs->ti->error = "rebuild for this index already given"; in parse_raid_params()
1335 rs->ti->error = "write_mostly option is only valid for RAID1"; in parse_raid_params()
1340 rs->ti->error = "Invalid write_mostly index given"; in parse_raid_params()
1349 rs->ti->error = "max_write_behind option is only valid for RAID1"; in parse_raid_params()
1354 rs->ti->error = "Only one max_write_behind argument pair allowed"; in parse_raid_params()
1359 rs->ti->error = "Max write-behind limit out of range"; in parse_raid_params()
1366 rs->ti->error = "Only one daemon_sleep argument pair allowed"; in parse_raid_params()
1370 rs->ti->error = "daemon sleep period out of range"; in parse_raid_params()
1377 rs->ti->error = "Only one data_offset argument pair allowed"; in parse_raid_params()
1383 rs->ti->error = "Bogus data_offset value"; in parse_raid_params()
1390 rs->ti->error = "Only one delta_disks argument pair allowed"; in parse_raid_params()
1395 rs->ti->error = "Too many delta_disk requested"; in parse_raid_params()
1402 rs->ti->error = "Only one stripe_cache argument pair allowed"; in parse_raid_params()
1407 rs->ti->error = "Inappropriate argument: stripe_cache"; in parse_raid_params()
1412 rs->ti->error = "Bogus stripe cache entries value"; in parse_raid_params()
1418 rs->ti->error = "Only one min_recovery_rate argument pair allowed"; in parse_raid_params()
1423 rs->ti->error = "min_recovery_rate out of range"; in parse_raid_params()
1429 rs->ti->error = "Only one max_recovery_rate argument pair allowed"; in parse_raid_params()
1434 rs->ti->error = "max_recovery_rate out of range"; in parse_raid_params()
1440 rs->ti->error = "Only one region_size argument pair allowed"; in parse_raid_params()
1448 rs->ti->error = "Only one raid10_copies argument pair allowed"; in parse_raid_params()
1453 rs->ti->error = "Bad value for 'raid10_copies'"; in parse_raid_params()
1460 rs->ti->error = "Unable to parse RAID parameter"; in parse_raid_params()
1467 rs->ti->error = "sync and nosync are mutually exclusive"; in parse_raid_params()
1474 rs->ti->error = "sync/nosync and rebuild are mutually exclusive"; in parse_raid_params()
1479 rs->ti->error = "Can't set all raid1 devices to write_mostly"; in parse_raid_params()
1485 rs->ti->error = "Bogus recovery rates"; in parse_raid_params()
1497 if (dm_set_target_max_io_len(rs->ti, max_io_len)) in parse_raid_params()
1502 rs->ti->error = "Not enough devices to satisfy specification"; in parse_raid_params()
1508 rs->ti->error = "Error getting raid10 format"; in parse_raid_params()
1514 rs->ti->error = "Failed to recognize new raid10 layout"; in parse_raid_params()
1521 rs->ti->error = "RAID10 format 'near' and 'raid10_use_near_sets' are incompatible"; in parse_raid_params()
1546 rs->ti->error = "Inappropriate raid level; cannot change stripe_cache size"; in rs_set_raid456_stripe_cache()
1558 rs->ti->error = "Cannot change stripe_cache size on inactive RAID set"; in rs_set_raid456_stripe_cache()
1566 rs->ti->error = "Failed to set raid4/5/6 stripe cache size"; in rs_set_raid456_stripe_cache()
1617 rs->ti->error = "Component device(s) too small"; in _check_data_dev_sectors()
1664 rs->ti->error = "Bogus raid10 data copies or delta disks"; in rs_set_dev_and_array_sectors()
1689 rs->ti->error = "Target length not divisible by number of data devices"; in rs_set_dev_and_array_sectors()
1734 dm_table_event(rs->ti->table); in do_table_event()
1749 rs->ti->error = "Can't takeover degraded raid set"; in rs_check_takeover()
1754 rs->ti->error = "Can't takeover reshaping raid set"; in rs_check_takeover()
1893 rs->ti->error = "takeover not possible"; in rs_check_takeover()
2046 rs->ti->error = "Reshape not supported"; in rs_check_reshape()
2048 rs->ti->error = "Can't reshape degraded raid set"; in rs_check_reshape()
2050 rs->ti->error = "Convert request on recovering raid set prohibited"; in rs_check_reshape()
2052 rs->ti->error = "raid set already reshaping!"; in rs_check_reshape()
2054 rs->ti->error = "Reshaping only supported for raid1/4/5/6/10"; in rs_check_reshape()
2428 rs->ti->error = in super_init_validation()
2438 rs->ti->error = "Cannot change device positions in raid set"; in super_init_validation()
2476 rs->ti->error = "Unable to assemble array: Unknown flag(s) in compatible feature flags"; in super_validate()
2481 rs->ti->error = "Unable to assemble array: No incompatible feature flags supported yet"; in super_validate()
2528 static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs) in analyse_superblocks() argument
2603 rs->ti->error = "Unable to assemble array: Invalid superblocks"; in analyse_superblocks()
2608 rs->ti->error = "Insufficient redundancy to activate array"; in analyse_superblocks()
2697 rs->ti->error = data_offset ? "No space for forward reshape" : in rs_adjust_data_offsets()
2799 rs->ti->error = "Can't reshape raid10 mirror groups"; in rs_prepare_reshape()
2826 rs->ti->error = "Called with bogus raid type"; in rs_prepare_reshape()
2909 r = rs_set_dev_and_array_sectors(rs, rs->ti->len, true); in rs_setup_reshape()
2972 struct dm_target *ti = rs->ti; in configure_discard_support() local
2993 ti->num_discard_bios = 1; in configure_discard_support()
3009 static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv) in raid_ctr() argument
3027 ti->error = "No arguments"; in raid_ctr()
3033 ti->error = "Unrecognised raid_type"; in raid_ctr()
3038 if (dm_read_arg_group(_args, &as, &num_raid_params, &ti->error)) in raid_ctr()
3045 if (dm_read_arg(_args + 1, &as_nrd, &num_raid_devs, &ti->error)) in raid_ctr()
3049 ti->error = "Invalid number of supplied raid devices"; in raid_ctr()
3053 rs = raid_set_alloc(ti, rt, num_raid_devs); in raid_ctr()
3073 r = rs_set_dev_and_array_sectors(rs, rs->ti->len, false); in raid_ctr()
3088 r = analyse_superblocks(ti, rs); in raid_ctr()
3096 ti->error = "Invalid rdev size"; in raid_ctr()
3110 ti->private = rs; in raid_ctr()
3111 ti->num_flush_bios = 1; in raid_ctr()
3112 ti->needs_bio_set_dev = true; in raid_ctr()
3127 ti->error = "'nosync' not allowed for new raid6 set"; in raid_ctr()
3140 ti->error = "Can't resize a reshaping raid set"; in raid_ctr()
3147 ti->error = "Can't takeover a reshaping raid set"; in raid_ctr()
3154 ti->error = "Can't takeover a journaled raid4/5/6 set"; in raid_ctr()
3190 ti->error = "Can't reshape a journaled raid4/5/6 set"; in raid_ctr()
3231 r = rs_set_dev_and_array_sectors(rs, rs->ti->len, false); in raid_ctr()
3262 ti->error = "Failed to run raid array"; in raid_ctr()
3269 ti->error = "Failed to start raid array"; in raid_ctr()
3277 ti->error = "Failed to set raid4/5/6 journal mode"; in raid_ctr()
3303 ti->error = "Reshape check failed"; in raid_ctr()
3311 rs->md.dm_gendisk = dm_disk(dm_table_get_md(ti->table)); in raid_ctr()
3325 static void raid_dtr(struct dm_target *ti) in raid_dtr() argument
3327 struct raid_set *rs = ti->private; in raid_dtr()
3339 static int raid_map(struct dm_target *ti, struct bio *bio) in raid_map() argument
3341 struct raid_set *rs = ti->private; in raid_map()
3524 static void raid_status(struct dm_target *ti, status_type_t type, in raid_status() argument
3527 struct raid_set *rs = ti->private; in raid_status()
3695 DMEMIT_TARGET_NAME_VERSION(ti->type); in raid_status()
3730 static int raid_message(struct dm_target *ti, unsigned int argc, char **argv, in raid_message() argument
3733 struct raid_set *rs = ti->private; in raid_message()
3793 static int raid_iterate_devices(struct dm_target *ti, in raid_iterate_devices() argument
3796 struct raid_set *rs = ti->private; in raid_iterate_devices()
3802 r = fn(ti, rs->dev[i].data_dev, in raid_iterate_devices()
3811 static void raid_io_hints(struct dm_target *ti, struct queue_limits *limits) in raid_io_hints() argument
3813 struct raid_set *rs = ti->private; in raid_io_hints()
3820 static void raid_presuspend(struct dm_target *ti) in raid_presuspend() argument
3822 struct raid_set *rs = ti->private; in raid_presuspend()
3843 static void raid_presuspend_undo(struct dm_target *ti) in raid_presuspend_undo() argument
3845 struct raid_set *rs = ti->private; in raid_presuspend_undo()
3850 static void raid_postsuspend(struct dm_target *ti) in raid_postsuspend() argument
3852 struct raid_set *rs = ti->private; in raid_postsuspend()
4003 rs->ti->error = "pers->check_reshape() failed"; in rs_start_reshape()
4014 rs->ti->error = "pers->start_reshape() failed"; in rs_start_reshape()
4029 static int raid_preresume(struct dm_target *ti) in raid_preresume() argument
4032 struct raid_set *rs = ti->private; in raid_preresume()
4102 static void raid_resume(struct dm_target *ti) in raid_resume() argument
4104 struct raid_set *rs = ti->private; in raid_resume()