• Home
  • Raw
  • Download

Lines Matching refs:ti

50 	struct dm_target *ti;  member
252 static int mirror_flush(struct dm_target *ti) in mirror_flush() argument
254 struct mirror_set *ms = ti->private; in mirror_flush()
345 from.count = ms->ti->len & (region_size - 1); in recover()
399 dm_table_event(ms->ti->table); in do_recovery()
447 return m->offset + dm_target_offset(m->ms->ti, bio->bi_sector); in map_sector()
478 if (dm_noflush_suspending(ms->ti)) in hold_bio()
817 dm_table_event(ms->ti->table); in trigger_event()
851 struct dm_target *ti, in alloc_context() argument
861 ti->error = "Cannot allocate mirror context"; in alloc_context()
871 ms->ti = ti; in alloc_context()
873 ms->nr_regions = dm_sector_div_up(ti->len, region_size); in alloc_context()
882 ti->error = "Error creating dm_io client"; in alloc_context()
889 ms->ti->begin, MAX_RECOVERY, in alloc_context()
892 ti->error = "Error creating dirty region hash"; in alloc_context()
901 static void free_context(struct mirror_set *ms, struct dm_target *ti, in free_context() argument
905 dm_put_device(ti, ms->mirror[m].dev); in free_context()
912 static int get_mirror(struct mirror_set *ms, struct dm_target *ti, in get_mirror() argument
919 ti->error = "Invalid offset"; in get_mirror()
923 if (dm_get_device(ti, argv[0], dm_table_get_mode(ti->table), in get_mirror()
925 ti->error = "Device lookup failure"; in get_mirror()
940 static struct dm_dirty_log *create_dirty_log(struct dm_target *ti, in create_dirty_log() argument
949 ti->error = "Insufficient mirror log arguments"; in create_dirty_log()
954 ti->error = "Invalid mirror log argument count"; in create_dirty_log()
961 ti->error = "Insufficient mirror log arguments"; in create_dirty_log()
965 dl = dm_dirty_log_create(argv[0], ti, mirror_flush, param_count, in create_dirty_log()
968 ti->error = "Error creating mirror dirty log"; in create_dirty_log()
979 struct dm_target *ti = ms->ti; in parse_features() local
988 ti->error = "Invalid number of features"; in parse_features()
997 ti->error = "Not enough arguments to support feature count"; in parse_features()
1004 ti->error = "Unrecognised feature requested"; in parse_features()
1025 static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) in mirror_ctr() argument
1033 dl = create_dirty_log(ti, argc, argv, &args_used); in mirror_ctr()
1042 ti->error = "Invalid number of mirrors"; in mirror_ctr()
1050 ti->error = "Too few mirror arguments"; in mirror_ctr()
1055 ms = alloc_context(nr_mirrors, dl->type->get_region_size(dl), ti, dl); in mirror_ctr()
1063 r = get_mirror(ms, ti, m, argv); in mirror_ctr()
1065 free_context(ms, ti, m); in mirror_ctr()
1072 ti->private = ms; in mirror_ctr()
1074 r = dm_set_target_max_io_len(ti, dm_rh_get_region_size(ms->rh)); in mirror_ctr()
1078 ti->num_flush_bios = 1; in mirror_ctr()
1079 ti->num_discard_bios = 1; in mirror_ctr()
1080 ti->per_bio_data_size = sizeof(struct dm_raid1_bio_record); in mirror_ctr()
1081 ti->discard_zeroes_data_unsupported = true; in mirror_ctr()
1112 ti->error = "Too many mirror arguments"; in mirror_ctr()
1129 free_context(ms, ti, ms->nr_mirrors); in mirror_ctr()
1133 static void mirror_dtr(struct dm_target *ti) in mirror_dtr() argument
1135 struct mirror_set *ms = (struct mirror_set *) ti->private; in mirror_dtr()
1142 free_context(ms, ti, ms->nr_mirrors); in mirror_dtr()
1148 static int mirror_map(struct dm_target *ti, struct bio *bio) in mirror_map() argument
1152 struct mirror_set *ms = ti->private; in mirror_map()
1197 static int mirror_end_io(struct dm_target *ti, struct bio *bio, int error) in mirror_end_io() argument
1200 struct mirror_set *ms = (struct mirror_set *) ti->private; in mirror_end_io()
1260 static void mirror_presuspend(struct dm_target *ti) in mirror_presuspend() argument
1262 struct mirror_set *ms = (struct mirror_set *) ti->private; in mirror_presuspend()
1306 static void mirror_postsuspend(struct dm_target *ti) in mirror_postsuspend() argument
1308 struct mirror_set *ms = ti->private; in mirror_postsuspend()
1316 static void mirror_resume(struct dm_target *ti) in mirror_resume() argument
1318 struct mirror_set *ms = ti->private; in mirror_resume()
1353 static void mirror_status(struct dm_target *ti, status_type_t type, in mirror_status() argument
1357 struct mirror_set *ms = (struct mirror_set *) ti->private; in mirror_status()
1391 static int mirror_iterate_devices(struct dm_target *ti, in mirror_iterate_devices() argument
1394 struct mirror_set *ms = ti->private; in mirror_iterate_devices()
1399 ret = fn(ti, ms->mirror[i].dev, in mirror_iterate_devices()
1400 ms->mirror[i].offset, ti->len, data); in mirror_iterate_devices()