Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Apr 1996 16:49:31 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-current@FreeBSD.org, j@uriah.heep.sax.de
Subject:   Re: devfs questions
Message-ID:  <199604070649.QAA31787@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Better to force "changedisk" and suggest people buy good floppy
>> drives

>This is unrelated.  Changelin support is unavailable for exotic
>drives, and i think it's also unavailable for drives 2 and 3.  I agree
>that it should be used if it is there.  (Didn't i say the floppy
>driver needs a rewrite? :-)

The change line is only valid while the motor is on, so it is almost
useless for automatic slice building.  Consider the following setup:

- fd0 motor off.
- all devices on fd0 closed.
- drive was previously opened, and it had slices fd0s1..fd0s4 on it,
  and the slice driver has left these (possibly stale) devices in
  the devfs tree for convenience (this is what it does now).

What happens an attempt is made to open /dev/fd0s4 and /dev/fd0s4 has
gone away?  Currently, the slice table is read and the open fails
because fd0s4 no longer exists, and fd0s4 disappears from the devfs
tree.  This behaviour is right and wouldn't be significantly different
if the disk change line was supported - the slice table would be read
because the disk has changed instead of always like it is now.

The case where fd0s4 doesn't exist in the devfs tree but exists on the
disk after a disk change is more interesting/broken.  Then there is
no way to reference /dev/fd0s4 without first opening /dev/fd0 or some
other existent slice or partition on fd0.  Disk change line support
wouldn't be much used for fixing this because disk changes aren't
reported until you look.

>> The first thing to do is to cause 0x370 referencing code to be added
>> to the floppy driver so that this is not a problem for 95% of all 3.5"
>> disks.

>There's not much different between modern 3.5in and 5.25in drives.
>All AT drives are supposed to support changeline logic, and systems
>like OS/2 do break if the drives are broken.

I have 2 out of 3 3.5in drives with broken change lines and 1 out of 3
much older but less fragile 5.25in drives with broken change lines :-(.
This causes problems under DOS when I forget to hit ^C to tell it to 
reset the disk.  It used to cause problems under Linux.  Linux now has
ioctls to disable the change line support.  Installing new drives is
not an acceptable fix because I break things at install time :-).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604070649.QAA31787>