Commit 5fa3142d authored by Fam Zheng's avatar Fam Zheng Committed by Michael S. Tsirkin

virtio-blk: Allow extended partitions

This will allow up to DISK_MAX_PARTS (256) partitions, with for example
GPT in the guest. Otherwise, the partition scan code will only discover
the first 15 partitions.
Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 38c4ab8e
...@@ -656,6 +656,7 @@ static int virtblk_probe(struct virtio_device *vdev) ...@@ -656,6 +656,7 @@ static int virtblk_probe(struct virtio_device *vdev)
vblk->disk->private_data = vblk; vblk->disk->private_data = vblk;
vblk->disk->fops = &virtblk_fops; vblk->disk->fops = &virtblk_fops;
vblk->disk->driverfs_dev = &vdev->dev; vblk->disk->driverfs_dev = &vdev->dev;
vblk->disk->flags |= GENHD_FL_EXT_DEVT;
vblk->index = index; vblk->index = index;
/* configure queue flush support */ /* configure queue flush support */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment