Subject: Re: 32 bit dev_t, Revision 3
To: Jason Thorpe <>
From: Bill Studenmund <>
List: tech-kern
Date: 01/14/1998 16:14:37
On Wed, 14 Jan 1998, Jason Thorpe wrote:

> On Wed, 14 Jan 1998 10:15:59 -0800 (PST) 
> (Bill Studenmund) wrote:
>  > 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.
> Can we _please please_ drop the idea of making a unit number out of
> a <target,lun>?  Autoconfiguration dynamically assigns the unit numbers
> based on locators configuration entries, does device cloning, etc.
> The suggestion of tying disk unit number to very specific-to-what-the-disk-
> sits-on locator information is contrary to how we've been assigning unit
> numbers for ... many years now.

I'm sorry. I wasn't trying to say that the device & LUN would each have
specific bit fields. I strongly agree with you that that'd be gross.

I was just trying to say that when we talk about "unit" and "subunit",
that drives on the same SCSI device but at different LUN's would attach as
different units. Unless nailed down in the kernel config, they would just
get numbered in order. As opposed to "unit" being the SCSI device and
"subunit" somehow encoding the LUN.

Just so everyone can see how this differes from using bit fields, if I
have a cd player on scsibus0, target 3, and a 5-disk changer (which shows
up as 5 LUN's) at scsibus1, target 5, I'd get

cd0 at scsibus0, target 3, LUN 0
cd1 at scsibus1, target 5, LUN 0
cd2 at scsibus1, target 5, LUN 1
cd3 at scsibus1, target 5, LUN 2
cd4 at scsibus1, target 5, LUN 3
cd5 at scsibus1, target 5, LUN 4

No bitfields! :-)

If we start talking about 100's of drives in a system, this numbering will
become REAL useful. :-)

Take care,