Subject: Re: Another changer, another changer problem
To: Todd Whitesel <toddpw@best.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 10/04/1998 20:16:50
On Sun, 4 Oct 1998 20:11:39 -0700 (PDT) 
 Todd Whitesel <toddpw@best.com> wrote:

 > > Once again, look at the code. We do provide that minor number; it's
 > > the one attached to /dev/xdNc. That partition need not start at
 > > zero, and it doesn't matter what's in the disklabel in memory or
 > > on the disk. The start/end data for that partition are ignored.
 > 
 > WHY DIDN'T THIS COME UP SOONER. It would have saved me (and others)
 > quite a few posts. Hell, I was already proposing that we do this for
 > 'c' and maybe even 'd' !!

Um...

Ok, let's back up here...

The "raw partition" has always, for as long as I've used BSD,
meant "the entire disk".  When disklabels appeared, this didn't
change.  In order to make it work as "entire disk", you have to
just ignore what the disklabel says are the start/size of that
raw partition.

That's just the way it's always been, so why SHOULD it come up?

ANYWAY...

Note that on all platforms, RAW_PART == c, except i386, where it is d.
The i386 is a historical nightmare inherited from Jolitz, in this regard.
One of these days it might even get fixed if anyone were to follow through
with their proposals on fixing it, but that's a flame war for another day :-)

 > There's virtually no indication in the outwardly visible parts of the
 > system that this convention is silently being enforced.
 > 
 > > You look quite stupid when I explain this to you and you come back
 > > again without having understood a word of it. I advised you to read
 > > the code; now please go and do so before you bring this up again.
 > 
 > Source file please. Function or data structure to search for.
 > 
 > If you do not also provide that information, don't expect people to go
 > off and learn the whole source tree just for you.
 > 
 > People need to learn to give references when they use bits of source code
 > to make a point. Just like an academic discussion. It ain't that hard.

"Any disk driver."  src/sys/dev/scsipi/sd.c, sdstart() is a good spot
to see this in action.

(Note, that pointing to a data structure is sort of meaningless here...
the name "raw partition" is pretty self-describing, if you ask me :-)

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 940 5942