diff options
| author | oster <oster@NetBSD.org> | 2006-01-04 04:56:41 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2006-01-04 04:56:41 +0000 |
| commit | 35f400bfd917350d9ef3da79f9c6b3f0becba7f3 (patch) | |
| tree | 477bb4d7cc88006e80cbaabbdcd0cc909f9d988f /sys/dev/raidframe | |
| parent | cbb55b0a6fa81535a8a453021611357ce646d354 (diff) | |
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 (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index e6ed808e388..63cc2964e42 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -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 @@ KernelWakeupFunc(struct buf *vbp) /* 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); |
