The current mapping of SCSI disks is documented in sd.c:
* Device no to disk mapping:
* major disc2 disc p1
* |............|.............|....|....| <- dev_t
* 31 20 19 8 7 4 3 0
* Inside a major, we have 16k disks, however mapped non-
* contiguously. The first 16 disks are for major0, the next
* ones with major1, ... Disk 256 is for major0 again, disk 272
* for major1, ...
* As we stay compatible with our numbering scheme, we can reuse
* the well-know SCSI majors 8, 65--71, 136--143.
With some more bit shuffling, support for 64 partitions would be
possible without breaking backwards compatibility. For this, the two
upper bits of disc2 could be taken, limiting us to 4k disks per major
(or 32k disks in total). That's fine, the naming scheme
works for up to 18k disks only anyway.
Ugly of course ...