[PATCH] virtio_blk: Dont waste major numbers

Anthony Liguori
2008-01-31T13:51:33Z

Christian Borntraeger wrote:
> Rusty,
>
> currently virtio_blk uses one major number per device. While this works
> quite well on most systems it is wasteful and will exhaust major numbers
> on larger installations.
>
> This patch allocates a major number on init and will use 16 minor numbers
> for each disk. That will allow ~64k virtio_blk disks.
>

There's are some other limitations to the number of virtio block
devices.  For instances...

>  	sprintf(vblk->disk->disk_name, "vd%c", virtblk_index++);

This gets bogus after 64 disks.  We also have a hard limit for
virtio-pci based on the number of PCI slots available.  One thing I was
considering was whether we should try to support multiple disks per
virtio device.

Otherwise, this patch looks good to me.

Regards,

Anthony Liguori