Date: Mon, 1 May 1995 06:49:44 -0400 (EDT) From: Peter Dufault <dufault@hda.com> To: bde@zeta.org.au (Bruce Evans) Cc: hackers@FreeBSD.org, julian@FreeBSD.org Subject: SLICES and bits in the device numbers Message-ID: <199505011049.GAA20745@hda.com> In-Reply-To: <199505010448.OAA16733@godzilla.zeta.org.au> from "Bruce Evans" at May 1, 95 02:48:51 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans writes: > > Modified: sys/sys disklabel.h > > Log: > > making a reservation for more bits before people start using them > > in the minor number, (this stuff HAS to go!) > > The change I want is: > > /* > > 3 2 1 0 > > 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 > > _________________________________________________________________ > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > ----------------------------------------------------------------- > > | TYPE | SLICE | MAJOR? | UNIT |PART | <-now > > ----------------------------------------------------------------- > > | TYPE |PART2| SLICE | MAJOR? | UNIT |PART | <-soon > > ----------------------------------------------------------------- > > > > I want 3 more part bits (taken from 'TYPE' (useless as it is) (JRE) > > */ > > I already use the low 6 bits of the TYPE for FDTYPE() in isa/fdc.h :-]. > > Don't forget to update all the places that decode or encode the bits, e.g., > dkminor() in MAKEDEV. Even if I remove the fixed SCSI device (BUS-ID-LUN embedded in major number) that can no longer work for disks, I still need a control device for the disk that bypasses all normal processing and only permits the ioctl (for formatting disks and fixing broken tapes). It appears that for a disk drive, the only field that belongs to the driver is the UNIT field. While you're fixing macros should you perhaps add something like a "This is NOT a slice" bit so that most of the TYPE and SLICE fields revert to the driver? Or will someone please propose a better idea? Joerg proposes that I use "O_NONBLOCK" to specify a control device, but I don't like it because the changes are then spread throughout the SCSI system more than if I intercept a control device in scsi_driver.c (As I bounced off Bruce once before: it would be real nice if we could divorce the actual device from the disk aspects of it, so that once you had a reliable block transfer mechanism you could turn it into a full disk driver without modifying it. You'd have two devices - a pseudo device that was the disk driver and the actual device that was the block transfer method. But not now.) I need this now, BTW, so I welcome suggestions. -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505011049.GAA20745>