summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2000-06-02 04:05:40 +0000
committergrog <grog@FreeBSD.org>2000-06-02 04:05:40 +0000
commit9d6c03859ba18a90fa949111eb157945b2b8e51b (patch)
treee19b8438f0f62c473179540559863cad4a9e3932
parent1c276d6af78288da87725ed22a6c8e38b538792f (diff)
downloadFreeBSD-src-9d6c03859ba18a90fa949111eb157945b2b8e51b.zip
FreeBSD-src-9d6c03859ba18a90fa949111eb157945b2b8e51b.tar.gz
parityrebuild: write the parity block back to the correct subdisk.
HEADS UP: This fixes a serious data corruption bug when using the userland command 'rebuildparity'.
-rw-r--r--sys/dev/vinum/vinumrevive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vinum/vinumrevive.c b/sys/dev/vinum/vinumrevive.c
index 5301362..f52869e 100644
--- a/sys/dev/vinum/vinumrevive.c
+++ b/sys/dev/vinum/vinumrevive.c
@@ -37,7 +37,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumrevive.c,v 1.13 2000/05/10 22:43:01 grog Exp grog $
+ * $Id: vinumrevive.c,v 1.10 2000/01/03 03:40:54 grog Exp grog $
* $FreeBSD$
*/
@@ -413,7 +413,7 @@ parityrebuild(struct plex *plex,
if (sdno == psd)
parity_buf = (int *) bpp[sdno]->b_data;
if (sdno == newpsd) /* the new one? */
- bpp[sdno]->b_dev = VINUM_SD(psd); /* write back to the parity SD */
+ bpp[sdno]->b_dev = VINUM_SD(plex->sdnos[psd]); /* write back to the parity SD */
else
bpp[sdno]->b_dev = VINUM_SD(plex->sdnos[sdno]); /* device number */
bpp[sdno]->b_iocmd = BIO_READ; /* either way, read it */
OpenPOWER on IntegriCloud