Lines Matching refs:dm_dev
133 struct dm_dev dm_dev; member
643 BUG_ON(td->dm_dev.bdev); in open_table_device()
645 bdev = blkdev_get_by_dev(dev, td->dm_dev.mode | FMODE_EXCL, _dm_claim_ptr); in open_table_device()
651 blkdev_put(bdev, td->dm_dev.mode | FMODE_EXCL); in open_table_device()
655 td->dm_dev.bdev = bdev; in open_table_device()
656 td->dm_dev.dax_dev = fs_dax_get_by_bdev(bdev); in open_table_device()
665 if (!td->dm_dev.bdev) in close_table_device()
668 bd_unlink_disk_holder(td->dm_dev.bdev, dm_disk(md)); in close_table_device()
669 blkdev_put(td->dm_dev.bdev, td->dm_dev.mode | FMODE_EXCL); in close_table_device()
670 put_dax(td->dm_dev.dax_dev); in close_table_device()
671 td->dm_dev.bdev = NULL; in close_table_device()
672 td->dm_dev.dax_dev = NULL; in close_table_device()
681 if (td->dm_dev.bdev->bd_dev == dev && td->dm_dev.mode == mode) in find_table_device()
688 struct dm_dev **result) in dm_get_table_device()
702 td->dm_dev.mode = mode; in dm_get_table_device()
703 td->dm_dev.bdev = NULL; in dm_get_table_device()
711 format_dev_t(td->dm_dev.name, dev); in dm_get_table_device()
720 *result = &td->dm_dev; in dm_get_table_device()
724 void dm_put_table_device(struct mapped_device *md, struct dm_dev *d) in dm_put_table_device()
726 struct table_device *td = container_of(d, struct table_device, dm_dev); in dm_put_table_device()
745 td->dm_dev.name, refcount_read(&td->count)); in free_table_devices()
2912 static int __dm_pr_register(struct dm_target *ti, struct dm_dev *dev, in __dm_pr_register()