Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe Negate a condition, and flip if/else parts...
details: https://anonhg.NetBSD.org/src/rev/3d83b3ea5284
branches: trunk
changeset: 556960:3d83b3ea5284
user: oster <oster%NetBSD.org@localhost>
date: Wed Dec 31 03:29:11 2003 +0000
description:
Negate a condition, and flip if/else parts. Preparation for left-shifting
the (now) else part. No real functional change.
diffstat:
sys/dev/raidframe/rf_reconstruct.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (44 lines):
diff -r d98c7247b63a -r 3d83b3ea5284 sys/dev/raidframe/rf_reconstruct.c
--- a/sys/dev/raidframe/rf_reconstruct.c Wed Dec 31 03:02:57 2003 +0000
+++ b/sys/dev/raidframe/rf_reconstruct.c Wed Dec 31 03:29:11 2003 +0000
@@ -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 @@
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 @@
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) {
Home |
Main Index |
Thread Index |
Old Index