summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2002-09-09 02:44:17 +0000
committeroster <oster@NetBSD.org>2002-09-09 02:44:17 +0000
commit5965f8b92a0c044d4c2da838877e0cd2eafb013d (patch)
tree68df6438ea700b6ff2febc690fe76053fc5d7936 /sys/dev/raidframe
parent0f1300fa95c09ff92beb308f2b4642e4bd2e22a9 (diff)
Disallow 'reconstruct-in-place' on a component that has failed
and has already been reconstructed to a hot spare.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c8
1 files changed, 5 insertions, 3 deletions
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 <sys/cdefs.h>
-__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 <sys/time.h>
#include <sys/buf.h>
@@ -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..." */