Lines Matching refs:disk
51 struct gendisk *disk; member
202 blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); in virtblk_done()
313 static int virtblk_get_id(struct gendisk *disk, char *id_str) in virtblk_get_id() argument
315 struct virtio_blk *vblk = disk->private_data; in virtblk_get_id()
316 struct request_queue *q = vblk->disk->queue; in virtblk_get_id()
328 blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); in virtblk_get_id()
365 static void virtblk_release(struct gendisk *disk, fmode_t mode) in virtblk_release() argument
367 struct virtio_blk *vblk = disk->private_data; in virtblk_release()
424 struct gendisk *disk = dev_to_disk(dev); in serial_show() local
431 err = virtblk_get_id(disk, buf); in serial_show()
447 struct request_queue *q = vblk->disk->queue; in virtblk_update_capacity()
471 vblk->disk->disk_name, in virtblk_update_capacity()
478 set_capacity_revalidate_and_notify(vblk->disk, capacity, true); in virtblk_update_capacity()
609 blk_queue_write_cache(vblk->disk->queue, writeback, false); in virtblk_update_cache_mode()
610 revalidate_disk_size(vblk->disk, true); in virtblk_update_cache_mode()
621 struct gendisk *disk = dev_to_disk(dev); in cache_type_store() local
622 struct virtio_blk *vblk = disk->private_data; in cache_type_store()
639 struct gendisk *disk = dev_to_disk(dev); in cache_type_show() local
640 struct virtio_blk *vblk = disk->private_data; in cache_type_show()
659 struct gendisk *disk = dev_to_disk(dev); in virtblk_attrs_are_visible() local
660 struct virtio_blk *vblk = disk->private_data; in virtblk_attrs_are_visible()
765 vblk->disk = alloc_disk(1 << PART_BITS); in virtblk_probe()
766 if (!vblk->disk) { in virtblk_probe()
799 vblk->disk->queue = q; in virtblk_probe()
803 virtblk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN); in virtblk_probe()
805 vblk->disk->major = major; in virtblk_probe()
806 vblk->disk->first_minor = index_to_minor(index); in virtblk_probe()
807 vblk->disk->private_data = vblk; in virtblk_probe()
808 vblk->disk->fops = &virtblk_fops; in virtblk_probe()
809 vblk->disk->flags |= GENHD_FL_EXT_DEVT; in virtblk_probe()
817 set_disk_ro(vblk->disk, 1); in virtblk_probe()
915 device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_groups); in virtblk_probe()
919 blk_cleanup_queue(vblk->disk->queue); in virtblk_probe()
923 put_disk(vblk->disk); in virtblk_probe()
942 del_gendisk(vblk->disk); in virtblk_remove()
943 blk_cleanup_queue(vblk->disk->queue); in virtblk_remove()
955 put_disk(vblk->disk); in virtblk_remove()
970 blk_mq_freeze_queue(vblk->disk->queue); in virtblk_freeze()
995 blk_mq_unfreeze_queue(vblk->disk->queue); in virtblk_restore()