When a read or write operation fails on a sector found on the bad block table,
authormiod <miod@openbsd.org>
Wed, 14 Jan 2015 21:17:09 +0000 (21:17 +0000)
committermiod <miod@openbsd.org>
Wed, 14 Jan 2015 21:17:09 +0000 (21:17 +0000)
commitc237c638190ec928708ee2df027dc46c0ab41c87
treebe09c6ba17dd2ee12eb1203031dbed60d520eb72
parentd220e64a45386dcee1eab366d434da03248f6e85
When a read or write operation fails on a sector found on the bad block table,
be sure to adjust the IOPB data pointer before redirecting the I/O for this
particular sector to the replacement location.

Otherwise, the data pointer still points to the first sector of the I/O, which
may not necessarily be the one which failed.

(This is yet another 19 years old bug, making your filesystems self-destruct
even faster than intended)
sys/arch/sparc/dev/xd.c
sys/arch/sparc/dev/xy.c