Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe We need to mark used spares as failed if t...
details: https://anonhg.NetBSD.org/src/rev/df81772292e3
branches: trunk
changeset: 586852:df81772292e3
user: oster <oster%NetBSD.org@localhost>
date: Wed Jan 04 04:56:41 2006 +0000
description:
We need to mark used spares as failed if they encounter IO errors!
Commit fixes problem reported (privately) by Jeff Rizzo.
XXX: Note that we are still are unable to allow a reconstruct of
a failed spare -- it's easy enough to attempt to do it, but the
code in rf_ContinueReconstructFailedDisk() isn't anywhere close to
ready to allow it. Yet another reason why the whole disk/spare thing
needs to be re-worked. *sigh*
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (34 lines):
diff -r 608097e595a4 -r df81772292e3 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Wed Jan 04 04:33:14 2006 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Wed Jan 04 04:56:41 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.192 2005/12/11 12:23:37 christos Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.193 2006/01/04 04:56:41 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -146,7 +146,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.192 2005/12/11 12:23:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.193 2006/01/04 04:56:41 oster Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -1955,9 +1955,12 @@
/* but only mark it once... */
/* and only if it wouldn't leave this RAID set
completely broken */
- if ((queue->raidPtr->Disks[queue->col].status ==
- rf_ds_optimal) && (queue->raidPtr->numFailures <
- queue->raidPtr->Layout.map->faultsTolerated)) {
+ if (((queue->raidPtr->Disks[queue->col].status ==
+ rf_ds_optimal) ||
+ (queue->raidPtr->Disks[queue->col].status ==
+ rf_ds_used_spare)) &&
+ (queue->raidPtr->numFailures <
+ queue->raidPtr->Layout.map->faultsTolerated)) {
printf("raid%d: IO Error. Marking %s as failed.\n",
queue->raidPtr->raidid,
queue->raidPtr->Disks[queue->col].devname);
Home |
Main Index |
Thread Index |
Old Index