From 5965f8b92a0c044d4c2da838877e0cd2eafb013d Mon Sep 17 00:00:00 2001 From: oster Date: Mon, 9 Sep 2002 02:44:17 +0000 Subject: Disallow 'reconstruct-in-place' on a component that has failed and has already been reconstructed to a hot spare. --- sys/dev/raidframe/rf_reconstruct.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/dev/raidframe') diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index 902a1936268..0232ccd984e 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.34 2002/07/13 20:54:57 oster Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.35 2002/09/09 02:44:17 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ ************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.34 2002/07/13 20:54:57 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.35 2002/09/09 02:44:17 oster Exp $"); #include #include @@ -454,7 +454,9 @@ rf_ReconstructInPlace(raidPtr, row, col) RF_UNLOCK_MUTEX(raidPtr->mutex); return (EINVAL); } - + if (raidPtr->Disks[row][col].status == rf_ds_spared) { + return (EINVAL); + } if (raidPtr->Disks[row][col].status != rf_ds_failed) { /* "It's gone..." */ -- cgit