From: richard@resumix.portal.com (Richard Davis) Subject: Floppies (was Re: File system issues!) Date: Tue, 14 Jul 1992 07:57:51 GMT
|From torvalds@klaava.Helsinki.FI 12 Jul 92 10:48:41 GMT
|From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
|Date: 12 Jul 92 10:48:41 GMT
|
|In article <1992Jul10.164650.2229@rs6000.cmp.ilstu.edu> jliddle@rs6000.cmp.ilstu.edu (Jean Liddle) writes:
|>
|>Doesn't the autodetect feature on fd0, fd1 already detect when a floppy has
|>been changed. I know under mtools I often get a message to the effect that
|>"the floppy is undefined because it has been changed". Mtools does not
|>leave the motor running. Perhaps this feature could be incorporated into
|>the standard linux floppy read/writes, if it hasn't already.
|
|Floppy change detection has been there since the beginning of the floppy
|driver (linux-0.11, I think. Note that the harddisk driver was there
|from the beginning), but only the autodetect floppies actually say
|something about it (as they have to re-detect the media, and the
|debugging info was a good way to make sure it detected them correctly).
|
|The main problem has been (a) some hardware simply doesn't send the
|correct floppy-changed signal (notably old drives: at least some 360kB
|5.25" drives) (b) some bugs in the early code (linux in fact thought a
|disk had been changed even when it hadn't in some circumstances).
|
|(b) should be corrected now (thanks to almesber: the floppy-changed
|signal is reset by seeking a bit), while (a) is still a problem on some
|(very few) drives.
|
|[ Note: the floppy-change signal is checked only when opening and
|mounting a floppy: if you change the floppy while the device is open or
|mounted you are in for some surprises ]
|
|>On another note, has anyone considered making 1.72 MB disks a la fdformat
|>for DOS readable under Linux?
|
|Check out the floppy ioctl()'s: along with the auto-detecting, almesber
|added support for forcing the floppy to use a user-defined setup, which
|can include these kinds of user-defined sizes (but note that the
|track-buffer is used only if there are <= 18 sectors per track, so you
|get bad performance with nonstandard formats beyond that).
|
|That said, the floppy driver is a mess. It's been changed and hacked on
|like the other drivers, but as it's a pain in the *** (and very boring)
|to program floppies, nobody has really cleaned it up. It's gotten
|better performance and features over time, but it's one of the pieces
|that should be taken out and shot. But I'm not going to, as writing a
|new one is just too depressing.
|
| Linus
|
|