From owner-freebsd-bugs Tue Dec 9 13:00:05 1997 Return-Path: <owner-freebsd-bugs> Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA05071 for bugs-outgoing; Tue, 9 Dec 1997 13:00:05 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA05043; Tue, 9 Dec 1997 13:00:02 -0800 (PST) (envelope-from gnats) Date: Tue, 9 Dec 1997 13:00:02 -0800 (PST) Message-Id: <199712092100.NAA05043@hub.freebsd.org> To: freebsd-bugs Cc: From: J Wunsch <j@uriah.heep.sax.de> Subject: Re: kern/5231: Mounted MS-DOS floppy disk writes unreliable/reads can crash system Reply-To: J Wunsch <j@uriah.heep.sax.de> Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/5231; it has been noted by GNATS. From: J Wunsch <j@uriah.heep.sax.de> To: gram@cdsec.com Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: kern/5231: Mounted MS-DOS floppy disk writes unreliable/reads can crash system Date: Tue, 9 Dec 1997 21:43:18 +0100 As gram@cdsec.com wrote: > This is with an Adaptec 1542B, although > I also have problems with my home PC which uses a motherboard-based FDC. > I haven't tried reading a corrupt diskette on the IDE machine as yet, > but I suspect the behaviour will be similar. I suspect that the corruption > on write is due to the PC services other interrupts while the write is > in progress; i.e. is timing related. No, interrupts are interrupts, floppy transfers are done by DMA. Does it also happen when _writing_ floppies on the IDE machine? Note that the FDC itself is totally unrelated, but the concurrent use of the AHA154x probably is. The AHA154x series has been known to hog the bus in DMA mode for too long for a long time. The floppy driver silently retries all transfers that have been aborted by the FDC with an error flag of ``DMA overrun'', until the transfer finally succeeds. When reading, this only reduces your effective data rate (drastically, btw.). When writing however, this means you've got half-written sectors all over the place, which have to be retried. This can cause subtle side- effects. If the above is indeed your problem, i'm afraid we can't do very much about it. DOS doesn't suffer from the problem solely since SCSI and floppy transfers never happen by the same time. Serializing all disk IO requests in Unix just for the purpose of supporting misbehaving hardware is probably a little much of work... I can try to reproduce and verify this on my scratch machine, although the floppy driver there is largely unused... That's with an AHA1540A adapter, and i know it suffers from the DMA overrun syndrome. (The initial ``retry all DMA overrun aborted transfers'' has been developed and tested on this machine.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)