Re: lots and lots of disks again

Kurt Garloff
2004-02-12T16:18:02Z

[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]

On Thu, Feb 12, 2004 at 03:57:21PM +0000, viro@parcelfarce.linux.theplanet.co.uk wrote:
> On Thu, Feb 12, 2004 at 04:00:35PM +0100, Kurt Garloff wrote:
> > Let's just use
> > 31 20 19 4 3 0
> > |--major--|---disk---|-part-|
> >
> > Any problems with that?
>
> What the hell is "major"?

A number out of 8, 64 -- 71, 136 -- 143.
Together with the disk part of the minor number, it determines the
disk we talk to. The other way round actually. When detecting disks,
we assign the device numbers according to a scheme
0x00800000,0x00800010, ... 0x008000f0, 0x04000000, ...
(0) (1) (15) (16)

0x00800100, ... 0x00800200
(256) (512)

The numbers in parens denote the detection order of the SCSI disks.

And we fill the number into the gendisk structure.
But you know this.

> Device numbers space is flat - you don't even
> need any sort of alignment for allocated chunks...

... and I suggest to use it the way outlined above.

Unless we go for the gendisk aliasing suggestion from James and allocate
a new major additionally. I did not yet check whether it's feasible.

Regards,
--
Kurt Garloff <garloff@suse.de> Cologne, DE
SUSE LINUX AG, Nuernberg, DE SUSE Labs (Head)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]