Another floppy-related problem
Pete Carah
pete at altadena.net
Tue Jan 25 13:31:23 PST 2005
There was another interesting problem uncovered by my trying to read in
most of my old floppy archive disks while I still could (!); cp *always*
mmaps the input file. If there is a hard error on a slow device, the
fact that the vnode-pager is doing the read makes the entire system hang.
This is not desirable for floppies for 2 reasons:
1. they are slow.
2. they are error-prone.
I suppose I could dd the whole floppy to a temp, then open it virtual.
If that were done with conv=noerror,sync then (in many cases) one could
recover as much data as could be recovered. That would be a fairly easy
script, and would probably be faster than reading the files directly from
the slow medium, at least if a full-track blocksize worked in the dd.
However, it *would* be nice to have a flag to cp, or another similar command
(I might be able to use cpio or tar in a pipeline?) that did ordinary reads
and not mmap... (for that matter, there are devices (I suspect floppies are
one of these, and I have seen hints that cdrom's are too) for which ordinary
reads are much faster than mmap for whatever reason.)
-- Pete
More information about the freebsd-current
mailing list