Re: Over 15 partitions on SCSI?

From: Andries Brouwer (aeb@veritas.com)
Date: Tue Jun 20 2000 - 19:00:22 EST


On Tue, Jun 20, 2000 at 05:12:24PM -0500, B. Galliart wrote:

> Is there any simple patch to get the kernel to report the full partition
> table when using SCSI as it does with the IDE driver?

The standard device number assignments allow for IDE disks
64 minors for each disk, and for SCSI 16 minors.
So, your results are entirely as expected.

Is it possible to change? Yes, of course - but the change is not
entirely trivial.

You want to look at the two 4's in struct gendisk sd_gendisk
in sd.c and change them to 6. Change SCSI_DISKS_PER_MAJOR to 4.
Next, watch carefully all the `<<4' in sd.c, curse the programmer
who in spite of the presence of so many symbolic constants with
the same meaning, and structure fields that already have the right
value, chose to write an explicit 4, next understand what the 4 is for,
and change the 4 to 2 when it is making place for SCSI_DISKS_PER_MAJOR
things, or to 6 when it is the bitshift for majors, and leave the 4
a 4 when it must not be changed. Probably a few more small changes
that I forgot right now.

Altogether half an hour's work.
Afterwards a few (very few) programs will fail because of built-in
ideas about the number of minors per disk. LILO is the only one
I can think of right now.

No doubt it would be a good idea to do this in the standard kernel,
but /dev/sdb would suddenly become /dev/sda16 and many people
would be unhappy.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:21 EST