summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2003-12-31 03:29:11 +0000
committeroster <oster@NetBSD.org>2003-12-31 03:29:11 +0000
commit824f2ed9303ed96dbffef73142227f85c6949394 (patch)
tree94dbb1fb727645a5337e00ae2d0896baa4c2e5ae /sys/dev/raidframe
parent00515ece621126d169c874c00ba32c3e766e3a58 (diff)
Negate a condition, and flip if/else parts. Preparation for left-shifting
the (now) else part. No real functional change.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c
index 2dfdd579d09..9f95658db9f 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.60 2003/12/30 21:59:03 oster Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.61 2003/12/31 03:29:11 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.60 2003/12/30 21:59:03 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.61 2003/12/31 03:29:11 oster Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@@ -364,7 +364,13 @@ rf_ReconstructInPlace(RF_Raid_t *raidPtr, RF_RowCol_t col)
int ac;
lp = raidPtr->Layout.map;
- if (lp->SubmitReconBuffer) {
+ if (!lp->SubmitReconBuffer) {
+ RF_ERRORMSG1("RECON: no way to reconstruct failed disk for arch %c\n",
+ lp->parityConfig);
+ /* wakeup anyone who might be waiting to do a reconstruct */
+ RF_SIGNAL_COND(raidPtr->waitForReconCond);
+ return(EIO);
+ } else {
/*
* The current infrastructure only supports reconstructing one
* disk at a time for each array.
@@ -513,10 +519,6 @@ rf_ReconstructInPlace(RF_Raid_t *raidPtr, RF_RowCol_t col)
raidPtr->reconInProgress--;
RF_UNLOCK_MUTEX(raidPtr->mutex);
- } else {
- RF_ERRORMSG1("RECON: no way to reconstruct failed disk for arch %c\n",
- lp->parityConfig);
- rc = EIO;
}
if (!rc) {