Lines Matching refs:ti

143 	struct dm_target *ti;
711 if (!dm_suspended(wc->ti) && !writecache_has_error(wc)) {
925 static void writecache_suspend(struct dm_target *ti)
927 struct dm_writecache *wc = ti->private;
996 static void writecache_resume(struct dm_target *ti)
998 struct dm_writecache *wc = ti->private;
1118 if (dm_suspended(wc->ti)) {
1172 if (!dm_suspended(wc->ti))
1191 static int writecache_message(struct dm_target *ti, unsigned int argc, char **argv,
1195 struct dm_writecache *wc = ti->private;
1541 static int writecache_map(struct dm_target *ti, struct bio *bio)
1543 struct dm_writecache *wc = ti->private;
1555 bio->bi_iter.bi_sector = dm_target_offset(ti, bio->bi_iter.bi_sector);
1616 static int writecache_end_io(struct dm_target *ti, struct bio *bio, blk_status_t *status)
1618 struct dm_writecache *wc = ti->private;
1632 static int writecache_iterate_devices(struct dm_target *ti,
1635 struct dm_writecache *wc = ti->private;
1637 return fn(ti, wc->dev, 0, ti->len, data);
1640 static void writecache_io_hints(struct dm_target *ti, struct queue_limits *limits)
1642 struct dm_writecache *wc = ti->private;
1963 unlikely(dm_suspended(wc->ti)))
2003 if (likely(!dm_suspended(wc->ti)))
2183 static void writecache_dtr(struct dm_target *ti)
2185 struct dm_writecache *wc = ti->private;
2204 dm_put_device(ti, wc->dev);
2207 dm_put_device(ti, wc->ssd_dev);
2229 static int writecache_ctr(struct dm_target *ti, unsigned int argc, char **argv)
2252 ti->error = "Cannot allocate writecache structure";
2256 ti->private = wc;
2257 wc->ti = ti;
2274 ti->error = "Unable to allocate dm-io client";
2282 ti->error = "Could not allocate writeback workqueue";
2296 ti->error = "Couldn't spawn endio thread";
2320 ti->error = "Persistent memory or DAX not supported on this system";
2332 ti->error = "Could not allocate bio set";
2339 ti->error = "Could not allocate mempool";
2350 r = dm_get_device(ti, string, dm_table_get_mode(ti->table), &wc->dev);
2352 ti->error = "Origin data device lookup failed";
2363 r = dm_get_device(ti, string, dm_table_get_mode(ti->table), &wc->ssd_dev);
2365 ti->error = "Cache data device lookup failed";
2380 ti->error = "Invalid block size";
2386 ti->error = "Block size is smaller than device logical block size";
2398 r = dm_read_arg_group(_args, &as, &opt_params, &ti->error);
2496 ti->error = "Invalid optional argument";
2503 ti->error = "High watermark must be greater than or equal to low watermark";
2510 ti->error = "Asynchronous persistent memory not supported as pmem cache";
2516 ti->error = "Unable to map persistent memory for cache";
2530 ti->error = "Couldn't spawn flush thread";
2537 ti->error = "Invalid device size";
2546 ti->error = "Invalid device size";
2553 ti->error = "Unable to allocate memory for metadata";
2560 ti->error = "Unable to allocate dm-kcopyd client";
2571 ti->error = "Unable to allocate dirty bitmap";
2577 ti->error = "Unable to read first block of metadata";
2584 ti->error = "Hardware memory error when reading superblock";
2590 ti->error = "Unable to initialize device";
2596 ti->error = "Hardware memory error when reading superblock";
2602 ti->error = "Invalid magic in the superblock";
2608 ti->error = "Invalid version in the superblock";
2614 ti->error = "Block size does not match superblock";
2624 ti->error = "Overflow in size calculation";
2637 ti->error = "Memory area is too small";
2659 ti->error = "Cannot allocate memory";
2663 ti->num_flush_bios = WC_MODE_PMEM(wc) ? 1 : 2;
2664 ti->flush_supported = true;
2665 ti->num_discard_bios = 1;
2674 ti->error = "Bad arguments";
2676 writecache_dtr(ti);
2680 static void writecache_status(struct dm_target *ti, status_type_t type,
2683 struct dm_writecache *wc = ti->private;