ERRORS NOT SEEN WHEN READING RAW WD DEVICE
authorFrank Maclachlan <fpm@crash.cts.com>
Thu, 17 Sep 1992 00:00:00 +0000 (00:00 +0000)
committerFrank Maclachlan <fpm@crash.cts.com>
Thu, 17 Sep 1992 00:00:00 +0000 (00:00 +0000)
commitb886ea42958f811a0154f35c98eb4a926cfa67af
tree4e5554118a3d403f54c4f3725bfda40e2e1837fd
parent4f898c13a8f46b20ef932368ecbfad3f7e31e495
ERRORS NOT SEEN WHEN READING RAW WD DEVICE

I/O errors are not reported when reading/writing from/to the raw
wd disk device.  I noticed this when using 'dd' to scan a disk w/ known
bad blocks and couldn't find any.

The wd driver, '/sys/i386/isa/wd.c', sets the B_ERROR bit in
bp->b_flags, but fails to put an error code into bp->b_error.  Physio()
in '/sys/kern/kern__physio.c', which manages the raw I/O in this case,
ignores the B_ERROR bit in b_flags and looks for an error code in b_error.
The user program is fed garbage data and no clue that an error occurred.

AUTHOR: Frank Maclachlan (fpm@crash.cts.com)
386BSD-Patchkit: patch00038
usr/src/sys.386bsd/i386/isa/wd.c