From owner-freebsd-hackers Mon Jan 6 14:11:30 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id OAA03764 for hackers-outgoing; Mon, 6 Jan 1997 14:11:30 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id OAA03744 for ; Mon, 6 Jan 1997 14:11:10 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id PAA12717; Mon, 6 Jan 1997 15:01:30 -0700 From: Terry Lambert Message-Id: <199701062201.PAA12717@phaeton.artisoft.com> Subject: Re: more than 32 disks? To: peter@taronga.com (Peter da Silva) Date: Mon, 6 Jan 1997 15:01:30 -0700 (MST) Cc: hackers@freebsd.org In-Reply-To: <199701031302.HAA07824@bonkers.taronga.com> from "Peter da Silva" at Jan 3, 97 07:02:49 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > >> with an sd3 problem yet. :-) It looks like there are only 5 bits for the > >> unit number. This means that one will have to make driver changes to go > >> beyond 32 units. :-( > > >*sigh* I absolutely hate fixed fields :( *grumble*. So whats the generic > >solution besides encoding data into the minor number? Encode a table offset > >into the minor number and make the table dynamic? > > Use a wider minor number, a wider portion of the minor number for unit, > decrease the number of bits used for things other than unit, use multiple > major numbers, or use another encoding than major/minor numbers for device > files (via devfs). > > Some aspects of the System V kernel build model, where the major numbers > can be easily reassigned and the same file is used to drive the building > of the kernel and the files in /dev, are really handy. Of course devfs > makes it a point moot... The major number is the index in the cdevsw/bdevsw; the major number should go away (though devfs, unfortunately, carrys one around). It should die because cdevsw/bdevsw should die. The minor number is a unit index for the device driver; the minor number should go away, since the instance records which the device operates against should be referenced via the data pointer in the vnode for the device (which itself references a common driver data structure (though devfs, unfortunately, carrys around minor numbers, too). It should die because the unit records are context which can be provided by an allocated instead of a statically indexed unit context value for a given driver. So the point is not only moot, the context in which the point was being made is also moot (or should be... screw backward compatability with bogus old drivers -- update them to register with devfs if they are useful). Same argument applies to having permanent attributes set by chmod/chgrp/chown by reflecting static data into a real file system anywhere... if you want to change the values, do it in the config file when you define the device in the first place, and have it built into the registration record for the device instead of kludging it up. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.