[PATCH] virtio_blk: Dont waste major numbers

H. Peter Anvin
2008-03-20T17:38:31Z

Anthony Liguori wrote:
> 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.
>

I would much rather prefer a /dev/vd/dXpY naming scheme, similar to
cciss and other large disk installations.

Unfortunately yet another side effect of people not habitually
registering major numbers is that the namespace is not as well maintained.

	-hpa