From owner-freebsd-hackers Mon May 1 03:53:04 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id DAA21056 for hackers-outgoing; Mon, 1 May 1995 03:53:04 -0700 Received: from hda.com (hda.com [199.232.40.182]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id DAA21050 ; Mon, 1 May 1995 03:53:00 -0700 Received: (dufault@localhost) by hda.com (8.6.9/8.3) id GAA20745; Mon, 1 May 1995 06:49:44 -0400 From: Peter Dufault Message-Id: <199505011049.GAA20745@hda.com> Subject: SLICES and bits in the device numbers To: bde@zeta.org.au (Bruce Evans) Date: Mon, 1 May 1995 06:49:44 -0400 (EDT) Cc: hackers@FreeBSD.org, julian@FreeBSD.org In-Reply-To: <199505010448.OAA16733@godzilla.zeta.org.au> from "Bruce Evans" at May 1, 95 02:48:51 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 2576 Sender: hackers-owner@FreeBSD.org Precedence: bulk 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