On Sun, Jan 27, 2008 at 08:32:10PM +0000, Daniel P. Berrange wrote:
As mentioned in this thread:
http://www.redhat.com/archives/libvir-list/2008-January/msg00475.html
The code for calculating block devices numbers has a number of flaws.
This patch fixes the flaws and adds a comprehensive test program to
validate it. The test program also validates invalid cases.
NB, this code is actually now more perfect than Xen, since Xen doesn't
handle SCSI disks > sdp, even though you can go all the way to sdhv.
The rules are:
* hdNM: N=a-t, M=1-63, major={IDE0_MAJOR -> IDE9_MAJOR}
* sdNM: N=a-z,aa-hw, M=1-15, major={SCSI_DISK0_MAJOR -> SCSI_DISK15_MAJOR}
Opps, that should be 'iv' not 'hw' for the last disk
* xvdNM: N=a-p, M=1-15, major=XENVBD_MAJOR
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|