Lines Matching refs:ti

415 static int log_writes_ctr(struct dm_target *ti, unsigned int argc, char **argv)  in log_writes_ctr()  argument
426 ti->error = "Invalid argument count"; in log_writes_ctr()
432 ti->error = "Cannot allocate context"; in log_writes_ctr()
444 ret = dm_get_device(ti, devname, dm_table_get_mode(ti->table), &lc->dev); in log_writes_ctr()
446 ti->error = "Device lookup failed"; in log_writes_ctr()
451 ret = dm_get_device(ti, logdevname, dm_table_get_mode(ti->table), in log_writes_ctr()
454 ti->error = "Log device lookup failed"; in log_writes_ctr()
455 dm_put_device(ti, lc->dev); in log_writes_ctr()
462 ti->error = "Couldn't alloc kthread"; in log_writes_ctr()
463 dm_put_device(ti, lc->dev); in log_writes_ctr()
464 dm_put_device(ti, lc->logdev); in log_writes_ctr()
474 ti->num_flush_bios = 1; in log_writes_ctr()
475 ti->flush_supported = true; in log_writes_ctr()
476 ti->num_discard_bios = 1; in log_writes_ctr()
477 ti->discards_supported = true; in log_writes_ctr()
478 ti->per_bio_data_size = sizeof(struct per_bio_data); in log_writes_ctr()
479 ti->private = lc; in log_writes_ctr()
514 static void log_writes_dtr(struct dm_target *ti) in log_writes_dtr() argument
516 struct log_writes_c *lc = ti->private; in log_writes_dtr()
534 dm_put_device(ti, lc->dev); in log_writes_dtr()
535 dm_put_device(ti, lc->logdev); in log_writes_dtr()
539 static void normal_map_bio(struct dm_target *ti, struct bio *bio) in normal_map_bio() argument
541 struct log_writes_c *lc = ti->private; in normal_map_bio()
546 static int log_writes_map(struct dm_target *ti, struct bio *bio) in log_writes_map() argument
548 struct log_writes_c *lc = ti->private; in log_writes_map()
664 normal_map_bio(ti, bio); in log_writes_map()
668 static int normal_end_io(struct dm_target *ti, struct bio *bio, int error) in normal_end_io() argument
670 struct log_writes_c *lc = ti->private; in normal_end_io()
696 static void log_writes_status(struct dm_target *ti, status_type_t type, in log_writes_status() argument
701 struct log_writes_c *lc = ti->private; in log_writes_status()
717 static int log_writes_prepare_ioctl(struct dm_target *ti, in log_writes_prepare_ioctl() argument
720 struct log_writes_c *lc = ti->private; in log_writes_prepare_ioctl()
727 if (ti->len != i_size_read(dev->bdev->bd_inode) >> SECTOR_SHIFT) in log_writes_prepare_ioctl()
732 static int log_writes_iterate_devices(struct dm_target *ti, in log_writes_iterate_devices() argument
736 struct log_writes_c *lc = ti->private; in log_writes_iterate_devices()
738 return fn(ti, lc->dev, 0, ti->len, data); in log_writes_iterate_devices()
745 static int log_writes_message(struct dm_target *ti, unsigned argc, char **argv) in log_writes_message() argument
748 struct log_writes_c *lc = ti->private; in log_writes_message()
763 static void log_writes_io_hints(struct dm_target *ti, struct queue_limits *limits) in log_writes_io_hints() argument
765 struct log_writes_c *lc = ti->private; in log_writes_io_hints()