Date: Sat, 6 Apr 1996 17:45:20 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: bde@zeta.org.au (Bruce Evans) Cc: freebsd-current@FreeBSD.ORG, j@uriah.heep.sax.de Subject: Re: devfs questions Message-ID: <199604070045.RAA28784@phaeton.artisoft.com> In-Reply-To: <199604061657.CAA02813@godzilla.zeta.org.au> from "Bruce Evans" at Apr 7, 96 02:57:39 am
next in thread | previous in thread | raw e-mail | index | archive | help
> >Alas, the next would be fsck'ing, and so the big question is: how are > >the slice and partition entries supposed to be created? > > This doesn't work right yet. Initially there are only whole-disk device > names. Opening these creates the slice device names. Opening the > slices creates the partition device names. I think the root partition > gets opened by number (dev_t) so all the slice names and all the > partitions on the root slice get created. > > Opening everything at attach time would probably work OK for fixed > media. It fails for removable media. Consider floppies. Due to > your second-favourite PC design feature (:-), there is no good way > to tell if there is a floppy in the drive. This is why you need "device arrival notification" of some kind, and the sub devices, if any, should be created as a result of callback recognition as a result of that event. A floppy device which probes true would "arrive", but subslices, if any, would not arrive without a "diskchange" notification. This could either be implicit in a mount request (in which case we should limit ourselves toa single "slice" per floppy" to get rid of the requirement for other sub-devices), or as a reult of a specific "diskchange" event. A "diskchange" program would only need to successfully cause aread for an inserted floppy to trigger the callback process. Devices created from callback registration need to self-verify (per the conversation about crashes and the current DOSFS code) on any attempt to access a created subdevices. This could be implied in the mount without a great deal of difficulty. Obviously, using this scheme, there would be a top level device for removable media at all times. Most 3.5" floppies support change notificatio, if we fix what Bruce noted the other day regarding IDE/EIDE controller port address conflicts and handling IDE/EIDE controller problems. > I've just fixed the floppy devfs names. The unit numbering was wrong > (fd1 was type 8), the links to fd.xxxx were bogus, and most of the > fd.xxxx's weren't created. There are now too many devices: > > fd0 fd0f fd1c rfd0.820 rfd1.360 > fd0.1200 fd0g fd1d rfd0a rfd1.720 > fd0.1440 fd0h fd1e rfd0b rfd1.800 > fd0.1480 fd1 fd1f rfd0c rfd1.820 > fd0.1720 fd1.1200 fd1g rfd0d rfd1a > fd0.720 fd1.1440 fd1h rfd0e rfd1b > fd0.800 fd1.1480 rfd0 rfd0f rfd1c > fd0.820 fd1.360 rfd0.1200 rfd0g rfd1d > fd0a fd1.720 rfd0.1440 rfd0h rfd1e > fd0b fd1.800 rfd0.1480 rfd1 rfd1f > fd0c fd1.820 rfd0.1720 rfd1.1200 rfd1g > fd0d fd1a rfd0.720 rfd1.1440 rfd1h > fd0e fd1b rfd0.800 rfd1.1480 > > Note that fd0.360 doesn't exist since fd0 is 1440K, and fd1.1720 > doesn't exist since fd1 is 1200K. The devices [r]fd[0-1][a-h] > are fairly useless links to [r]fd[0-1]. The 1480K and 1720K devices > are actually 1476K and 1722K and should be renamed. > > I normally use a sliced version of this which only generates whole-disk > devices except of course when there are real partitions. Slicing and > partitioning of the fd.xxxx devices isn't supported. Slicing floppies is obnoxious anyway. I would be tempted to reduce the name space clutter by imposing hierarchy on the device. Frankly, other than formatting (which can damn well take a parameter for it), there is really no need to have media density encoded in device names. If DOS can deal with format detection, we can damn well do the same. There is no such thing as "A:" and "A.1440:", etc.. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604070045.RAA28784>