Lines Matching refs:dm_dev
173 struct dm_dev dm_dev; member
756 BUG_ON(td->dm_dev.bdev); in open_table_device()
758 bdev = blkdev_get_by_dev(dev, td->dm_dev.mode | FMODE_EXCL, _dm_claim_ptr); in open_table_device()
764 blkdev_put(bdev, td->dm_dev.mode | FMODE_EXCL); in open_table_device()
768 td->dm_dev.bdev = bdev; in open_table_device()
769 td->dm_dev.dax_dev = dax_get_by_host(bdev->bd_disk->disk_name); in open_table_device()
778 if (!td->dm_dev.bdev) in close_table_device()
781 bd_unlink_disk_holder(td->dm_dev.bdev, dm_disk(md)); in close_table_device()
782 blkdev_put(td->dm_dev.bdev, td->dm_dev.mode | FMODE_EXCL); in close_table_device()
783 put_dax(td->dm_dev.dax_dev); in close_table_device()
784 td->dm_dev.bdev = NULL; in close_table_device()
785 td->dm_dev.dax_dev = NULL; in close_table_device()
794 if (td->dm_dev.bdev->bd_dev == dev && td->dm_dev.mode == mode) in find_table_device()
801 struct dm_dev **result) in dm_get_table_device()
815 td->dm_dev.mode = mode; in dm_get_table_device()
816 td->dm_dev.bdev = NULL; in dm_get_table_device()
824 format_dev_t(td->dm_dev.name, dev); in dm_get_table_device()
833 *result = &td->dm_dev; in dm_get_table_device()
838 void dm_put_table_device(struct mapped_device *md, struct dm_dev *d) in dm_put_table_device()
840 struct table_device *td = container_of(d, struct table_device, dm_dev); in dm_put_table_device()
860 td->dm_dev.name, refcount_read(&td->count)); in free_table_devices()
3034 static int __dm_pr_register(struct dm_target *ti, struct dm_dev *dev, in __dm_pr_register()