Lines Matching refs:bdev
28 dev->bdev->bd_disk->fops->pr_ops; in bl_free_device()
31 error = ops->pr_register(dev->bdev, dev->pr_key, 0, in bl_free_device()
37 if (dev->bdev) in bl_free_device()
38 blkdev_put(dev->bdev, FMODE_READ | FMODE_WRITE); in bl_free_device()
172 map->bdev = dev->bdev; in bl_map_simple()
239 struct block_device *bdev; in bl_parse_simple() local
246 bdev = blkdev_get_by_dev(dev, FMODE_READ | FMODE_WRITE, NULL); in bl_parse_simple()
247 if (IS_ERR(bdev)) { in bl_parse_simple()
249 MAJOR(dev), MINOR(dev), PTR_ERR(bdev)); in bl_parse_simple()
250 return PTR_ERR(bdev); in bl_parse_simple()
252 d->bdev = bdev; in bl_parse_simple()
255 d->len = bdev_nr_bytes(d->bdev); in bl_parse_simple()
259 d->bdev->bd_disk->disk_name); in bl_parse_simple()
311 struct block_device *bdev; in bl_open_udev_path() local
319 bdev = blkdev_get_by_path(devname, FMODE_READ | FMODE_WRITE, NULL); in bl_open_udev_path()
320 if (IS_ERR(bdev)) { in bl_open_udev_path()
322 devname, PTR_ERR(bdev)); in bl_open_udev_path()
326 return bdev; in bl_open_udev_path()
336 struct block_device *bdev; in bl_open_dm_mpath_udev_path() local
346 bdev = blkdev_get_by_path(devname, FMODE_READ | FMODE_WRITE, NULL); in bl_open_dm_mpath_udev_path()
348 return bdev; in bl_open_dm_mpath_udev_path()
356 struct block_device *bdev; in bl_parse_scsi() local
363 bdev = bl_open_dm_mpath_udev_path(v); in bl_parse_scsi()
364 if (IS_ERR(bdev)) in bl_parse_scsi()
365 bdev = bl_open_udev_path(v); in bl_parse_scsi()
366 if (IS_ERR(bdev)) in bl_parse_scsi()
367 return PTR_ERR(bdev); in bl_parse_scsi()
368 d->bdev = bdev; in bl_parse_scsi()
370 d->len = bdev_nr_bytes(d->bdev); in bl_parse_scsi()
375 d->bdev->bd_disk->disk_name, d->pr_key); in bl_parse_scsi()
377 ops = d->bdev->bd_disk->fops->pr_ops; in bl_parse_scsi()
380 d->bdev->bd_disk->disk_name); in bl_parse_scsi()
385 error = ops->pr_register(d->bdev, 0, d->pr_key, true); in bl_parse_scsi()
388 d->bdev->bd_disk->disk_name); in bl_parse_scsi()
396 blkdev_put(d->bdev, FMODE_READ | FMODE_WRITE); in bl_parse_scsi()