Lines Matching full:disk

47 	/* The disk structure for the kernel. */
48 struct gendisk *disk; member
199 blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); in virtblk_done()
306 /* return id (s/n) string for *disk to *id_str
308 static int virtblk_get_id(struct gendisk *disk, char *id_str) in virtblk_get_id() argument
310 struct virtio_blk *vblk = disk->private_data; in virtblk_get_id()
311 struct request_queue *q = vblk->disk->queue; in virtblk_get_id()
323 blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); in virtblk_get_id()
360 static void virtblk_release(struct gendisk *disk, fmode_t mode) in virtblk_release() argument
362 struct virtio_blk *vblk = disk->private_data; in virtblk_release()
419 struct gendisk *disk = dev_to_disk(dev); in serial_show() local
426 err = virtblk_get_id(disk, buf); in serial_show()
442 struct request_queue *q = vblk->disk->queue; in virtblk_update_capacity()
466 vblk->disk->disk_name, in virtblk_update_capacity()
473 set_capacity_revalidate_and_notify(vblk->disk, capacity, true); in virtblk_update_capacity()
600 blk_queue_write_cache(vblk->disk->queue, writeback, false); in virtblk_update_cache_mode()
601 revalidate_disk_size(vblk->disk, true); in virtblk_update_cache_mode()
612 struct gendisk *disk = dev_to_disk(dev); in cache_type_store() local
613 struct virtio_blk *vblk = disk->private_data; in cache_type_store()
630 struct gendisk *disk = dev_to_disk(dev); in cache_type_show() local
631 struct virtio_blk *vblk = disk->private_data; in cache_type_show()
650 struct gendisk *disk = dev_to_disk(dev); in virtblk_attrs_are_visible() local
651 struct virtio_blk *vblk = disk->private_data; in virtblk_attrs_are_visible()
753 vblk->disk = alloc_disk(1 << PART_BITS); in virtblk_probe()
754 if (!vblk->disk) { in virtblk_probe()
787 vblk->disk->queue = q; in virtblk_probe()
791 virtblk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN); in virtblk_probe()
793 vblk->disk->major = major; in virtblk_probe()
794 vblk->disk->first_minor = index_to_minor(index); in virtblk_probe()
795 vblk->disk->private_data = vblk; in virtblk_probe()
796 vblk->disk->fops = &virtblk_fops; in virtblk_probe()
797 vblk->disk->flags |= GENHD_FL_EXT_DEVT; in virtblk_probe()
803 /* If disk is read-only in the host, the guest should obey */ in virtblk_probe()
805 set_disk_ro(vblk->disk, 1); in virtblk_probe()
888 device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_groups); in virtblk_probe()
894 put_disk(vblk->disk); in virtblk_probe()
913 del_gendisk(vblk->disk); in virtblk_remove()
914 blk_cleanup_queue(vblk->disk->queue); in virtblk_remove()
926 put_disk(vblk->disk); in virtblk_remove()
946 blk_mq_quiesce_queue(vblk->disk->queue); in virtblk_freeze()
963 blk_mq_unquiesce_queue(vblk->disk->queue); in virtblk_restore()