• Home
  • Raw
  • Download

Lines Matching refs:ti

68 	struct dm_target *ti;  member
163 static void free_pgpaths(struct list_head *pgpaths, struct dm_target *ti) in free_pgpaths() argument
169 dm_put_device(ti, pgpath->path.dev); in free_pgpaths()
175 struct dm_target *ti) in free_priority_group() argument
184 free_pgpaths(&pg->pgpaths, ti); in free_priority_group()
188 static struct multipath *alloc_multipath(struct dm_target *ti) in alloc_multipath() argument
207 m->ti = ti; in alloc_multipath()
208 ti->private = m; in alloc_multipath()
214 static int alloc_multipath_stage2(struct dm_target *ti, struct multipath *m) in alloc_multipath_stage2() argument
220 if (dm_use_blk_mq(dm_table_get_md(ti->table))) in alloc_multipath_stage2()
233 dm_table_set_type(ti->table, m->queue_mode); in alloc_multipath_stage2()
244 free_priority_group(pg, m->ti); in free_multipath()
451 struct mapped_device *md = dm_table_get_md((m)->ti->table); \
457 dm_noflush_suspending((m)->ti)); \
463 static int multipath_clone_and_map(struct dm_target *ti, struct request *rq, in multipath_clone_and_map() argument
467 struct multipath *m = ti->private; in multipath_clone_and_map()
588 static int multipath_map_bio(struct dm_target *ti, struct bio *bio) in multipath_map_bio() argument
590 struct multipath *m = ti->private; in multipath_map_bio()
601 dm_mq_kick_requeue_list(dm_table_get_md(m->ti->table)); in process_queued_io_list()
674 assign_bit(queue_if_no_path || dm_noflush_suspending(m->ti), in queue_if_no_path()
679 dm_table_run_md_queue_async(m->ti->table); in queue_if_no_path()
695 dm_table_event(m->ti->table); in trigger_event()
709 struct dm_target *ti) in parse_path_selector() argument
721 ti->error = "unknown path selector type"; in parse_path_selector()
725 r = dm_read_arg_group(_args, as, &ps_argc, &ti->error); in parse_path_selector()
734 ti->error = "path selector constructor failed"; in parse_path_selector()
745 struct dm_target *ti) in parse_path() argument
749 struct multipath *m = ti->private; in parse_path()
755 ti->error = "no device given"; in parse_path()
763 r = dm_get_device(ti, dm_shift_arg(as), dm_table_get_mode(ti->table), in parse_path()
766 ti->error = "error getting device"; in parse_path()
807 ti->error = "error attaching hardware handler"; in parse_path()
808 dm_put_device(ti, p->path.dev); in parse_path()
815 ti->error = "unable to set hardware " in parse_path()
817 dm_put_device(ti, p->path.dev); in parse_path()
823 r = ps->type->add_path(ps, &p->path, as->argc, as->argv, &ti->error); in parse_path()
825 dm_put_device(ti, p->path.dev); in parse_path()
847 struct dm_target *ti = m->ti; in parse_priority_group() local
851 ti->error = "not enough priority group arguments"; in parse_priority_group()
857 ti->error = "couldn't allocate priority group"; in parse_priority_group()
862 r = parse_path_selector(as, pg, ti); in parse_priority_group()
869 r = dm_read_arg(_args, as, &pg->nr_pgpaths, &ti->error); in parse_priority_group()
873 r = dm_read_arg(_args + 1, as, &nr_selector_args, &ti->error); in parse_priority_group()
883 ti->error = "not enough path parameters"; in parse_priority_group()
891 pgpath = parse_path(&path_args, &pg->ps, ti); in parse_priority_group()
905 free_priority_group(pg, ti); in parse_priority_group()
913 struct dm_target *ti = m->ti; in parse_hw_handler() local
919 if (dm_read_arg_group(_args, as, &hw_argc, &ti->error)) in parse_hw_handler()
943 ti->error = "memory allocation failed"; in parse_hw_handler()
964 struct dm_target *ti = m->ti; in parse_features() local
973 r = dm_read_arg_group(_args, as, &argc, &ti->error); in parse_features()
996 r = dm_read_arg(_args + 1, as, &m->pg_init_retries, &ti->error); in parse_features()
1003 r = dm_read_arg(_args + 2, as, &m->pg_init_delay_msecs, &ti->error); in parse_features()
1019 ti->error = "Unknown 'queue_mode' requested"; in parse_features()
1026 ti->error = "Unrecognised multipath feature request"; in parse_features()
1033 static int multipath_ctr(struct dm_target *ti, unsigned argc, char **argv) in multipath_ctr() argument
1050 m = alloc_multipath(ti); in multipath_ctr()
1052 ti->error = "can't allocate multipath"; in multipath_ctr()
1060 r = alloc_multipath_stage2(ti, m); in multipath_ctr()
1068 r = dm_read_arg(_args, &as, &m->nr_priority_groups, &ti->error); in multipath_ctr()
1072 r = dm_read_arg(_args + 1, &as, &next_pg_num, &ti->error); in multipath_ctr()
1078 ti->error = "invalid initial priority group"; in multipath_ctr()
1105 ti->error = "priority group count mismatch"; in multipath_ctr()
1110 ti->num_flush_bios = 1; in multipath_ctr()
1111 ti->num_discard_bios = 1; in multipath_ctr()
1112 ti->num_write_same_bios = 1; in multipath_ctr()
1113 ti->num_write_zeroes_bios = 1; in multipath_ctr()
1115 ti->per_io_data_size = multipath_per_bio_data_size(); in multipath_ctr()
1117 ti->per_io_data_size = sizeof(struct dm_mpath_io); in multipath_ctr()
1155 static void multipath_dtr(struct dm_target *ti) in multipath_dtr() argument
1157 struct multipath *m = ti->private; in multipath_dtr()
1187 dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti, in fail_path()
1230 dm_path_uevent(DM_UEVENT_PATH_REINSTATED, m->ti, in reinstate_path()
1238 dm_table_run_md_queue_async(m->ti->table); in reinstate_path()
1482 static int multipath_end_io(struct dm_target *ti, struct request *clone, in multipath_end_io() argument
1501 struct multipath *m = ti->private; in multipath_end_io()
1527 static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone, in multipath_end_io_bio() argument
1530 struct multipath *m = ti->private; in multipath_end_io_bio()
1576 static void multipath_presuspend(struct dm_target *ti) in multipath_presuspend() argument
1578 struct multipath *m = ti->private; in multipath_presuspend()
1583 static void multipath_postsuspend(struct dm_target *ti) in multipath_postsuspend() argument
1585 struct multipath *m = ti->private; in multipath_postsuspend()
1595 static void multipath_resume(struct dm_target *ti) in multipath_resume() argument
1597 struct multipath *m = ti->private; in multipath_resume()
1622 static void multipath_status(struct dm_target *ti, status_type_t type, in multipath_status() argument
1627 struct multipath *m = ti->private; in multipath_status()
1747 static int multipath_message(struct dm_target *ti, unsigned argc, char **argv) in multipath_message() argument
1751 struct multipath *m = ti->private; in multipath_message()
1756 if (dm_suspended(ti)) { in multipath_message()
1794 r = dm_get_device(ti, argv[1], dm_table_get_mode(ti->table), &dev); in multipath_message()
1803 dm_put_device(ti, dev); in multipath_message()
1810 static int multipath_prepare_ioctl(struct dm_target *ti, in multipath_prepare_ioctl() argument
1813 struct multipath *m = ti->private; in multipath_prepare_ioctl()
1845 dm_table_run_md_queue_async(m->ti->table); in multipath_prepare_ioctl()
1852 if (!r && ti->len != i_size_read((*bdev)->bd_inode) >> SECTOR_SHIFT) in multipath_prepare_ioctl()
1857 static int multipath_iterate_devices(struct dm_target *ti, in multipath_iterate_devices() argument
1860 struct multipath *m = ti->private; in multipath_iterate_devices()
1867 ret = fn(ti, p->path.dev, ti->begin, ti->len, data); in multipath_iterate_devices()
1892 static int multipath_busy(struct dm_target *ti) in multipath_busy() argument
1895 struct multipath *m = ti->private; in multipath_busy()