Lines Matching refs:bdev_file

19 	struct block_device *bdev = file_bdev(dev->bdev_file);  in bl_unregister_scsi()
35 struct block_device *bdev = file_bdev(dev->bdev_file); in bl_register_scsi()
97 if (dev->bdev_file) in bl_free_device()
98 fput(dev->bdev_file); in bl_free_device()
232 map->bdev = file_bdev(dev->bdev_file); in bl_map_simple()
299 struct file *bdev_file; in bl_parse_simple() local
306 bdev_file = bdev_file_open_by_dev(dev, BLK_OPEN_READ | BLK_OPEN_WRITE, in bl_parse_simple()
308 if (IS_ERR(bdev_file)) { in bl_parse_simple()
310 MAJOR(dev), MINOR(dev), PTR_ERR(bdev_file)); in bl_parse_simple()
311 return PTR_ERR(bdev_file); in bl_parse_simple()
313 d->bdev_file = bdev_file; in bl_parse_simple()
314 d->len = bdev_nr_bytes(file_bdev(bdev_file)); in bl_parse_simple()
318 file_bdev(bdev_file)->bd_disk->disk_name); in bl_parse_simple()
366 struct file *bdev_file; in bl_open_path() local
374 bdev_file = bdev_file_open_by_path(devname, BLK_OPEN_READ | BLK_OPEN_WRITE, in bl_open_path()
376 if (IS_ERR(bdev_file)) { in bl_open_path()
378 devname, PTR_ERR(bdev_file)); in bl_open_path()
382 return bdev_file; in bl_open_path()
392 struct file *bdev_file; in bl_parse_scsi() local
404 bdev_file = bl_open_path(v, "dm-uuid-mpath-0x"); in bl_parse_scsi()
405 if (IS_ERR(bdev_file)) in bl_parse_scsi()
406 bdev_file = bl_open_path(v, "wwn-0x"); in bl_parse_scsi()
407 if (IS_ERR(bdev_file)) in bl_parse_scsi()
408 bdev_file = bl_open_path(v, "nvme-eui."); in bl_parse_scsi()
409 if (IS_ERR(bdev_file)) { in bl_parse_scsi()
412 return PTR_ERR(bdev_file); in bl_parse_scsi()
414 d->bdev_file = bdev_file; in bl_parse_scsi()
415 bdev = file_bdev(bdev_file); in bl_parse_scsi()
435 fput(d->bdev_file); in bl_parse_scsi()