Subject: Re: 32 bit dev_t, Revision 3
To: Darren Reed <firstname.lastname@example.org>
From: Bill Studenmund <email@example.com>
Date: 01/14/1998 10:15:59
> In some mail I received from Chris G. Demetriou, sie wrote
> > What is the definition of 'unit'? For example, take SCSI. Does
> > device,LUN -> unit and partition number -> subunit, or does device ->
> > unit and LUN fit into subunit (with other information, e.g. partition
> > number)? Looking at the list Paul Vixie posted, it looks like the
> > former.
Since we scan for sd, and attach them wherever we find them (even on
ATAPI busses!), I'd say device,LUN -> unit and partition -> subunit.
> Hmm, I was thinking about the scsi case and came up with this:
> major = 12
> minor = 20 :
> - 4 bits bus
> - 4 bits target
> - 4 bits lun
> - 4 bits slice
> - 4 bits partition
> To my thinking, device = (bus,target) and subunit = (lun,slice,partition)
> I'm trying not to think about Fibre channel devices - from what people
> have said about it being able to hold 1000+ devices, a 20 bit minor just
> isn't big enough to hold all the information required.
> That is, a "unit" is an attachment to the bus and "subunit" is a device
> within that attachment.
Why are we hard coding all of these things? sd* will attach sd'd WHEREVER.
If a drive says it has two LUN's, two sd's can attach. If it says
it has 16 LUN's, then 16 sd's can attach. We don't need to reserve space
in bit fields for such things.
Even with a 10/10 split, you won't have problems until you actually have
1000 hard disks in one machine.
And since you can wire down disk #'s in the kernel config (sd2 at scsibus1
target 4 lun 6), you won't have to worry about drives moving if one
I vot for either a 12/8 or 14/6 split, even though it's different from
what BSDI did. 12/8 has the advantage of being easy to read. 14/6 has the
advantage that it gives us more units while still permitting 32 partitions.