diff options
| author | oster <oster@NetBSD.org> | 2004-01-02 21:41:08 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2004-01-02 21:41:08 +0000 |
| commit | 24b034a69eb7d3758db4989542ef719badb97a5a (patch) | |
| tree | 39d6df5e0ddfed31340d12b60a63caf16dd59ddc /sys/dev/raidframe/rf_engine.c | |
| parent | 1bbd0498b5b660fcb7980a2d986e8ec9e69c1d77 (diff) | |
Fix the "We panic if we can't create a DAG" problem that's existed
~forever. This requires a number of things:
1) If we can't create a DAG, set desc->numStripes to 0 in
rf_SelectAlgorithm. This will ensure that we don't attempt to free
any dagArray[] elements in rf_StateCleanup.
2) Modify rf_State_CreateDAG() to not panic in the event of a DAG
failure. Instead, set the bp->b_flags and bp->b_error, and set things
up to skip to rf_State_Cleanup().
3) Need to mark desc->status as "bad" so that we actually stop looking
for a different DAG. (which we won't find... no matter how many times
we try).
4) rf_State_LastState() will then do the biodone(), and return EIO for
the IO in question.
5) Remove some " || 1 "'s from ProcessNode(). These were for
debugging, and we don't need the failure notices spewing
over and over again as the failing DAGs are processed.
6) Needed to change
if (asmap->numDataFailed + asmap->numParityFailed > 1)
to
if ((asmap->numDataFailed + asmap->numParityFailed > 1) ||
(raidPtr->numFailures > 1)){
in rf_raid5.c so that it doesn't try to return
rf_CreateNonRedundantWriteDAG as the creation function.
7) Note that we can't apply the above change to the RAID 1 code as
with the silly "fake 2-D" RAID 1 sets, it is possible to have 2 failed
components in the RAID 1 set, and that would stop them from working.
(I really don't know why/how those "fake 2-D" RAID 1 sets even work
with all the "single-fault" assumptions present in the rest of the
code.)
8) Needed to protect rf_RAID0DagSelect() in a similar way -- it should
return NULL as the createFunc.
9) No point printing out "Multiple disks failed..." a zillion times.
Diffstat (limited to 'sys/dev/raidframe/rf_engine.c')
| -rw-r--r-- | sys/dev/raidframe/rf_engine.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_engine.c b/sys/dev/raidframe/rf_engine.c index 1177234f204..619981e6162 100644 --- a/sys/dev/raidframe/rf_engine.c +++ b/sys/dev/raidframe/rf_engine.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_engine.c,v 1.30 2004/01/01 19:27:36 oster Exp $ */ +/* $NetBSD: rf_engine.c,v 1.31 2004/01/02 21:41:08 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -55,7 +55,7 @@ ****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.30 2004/01/01 19:27:36 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.31 2004/01/02 21:41:08 oster Exp $"); #include <sys/errno.h> @@ -624,13 +624,13 @@ ProcessNode(RF_DagNode_t *node, int context) (node->dagHdr->numCommitNodes == 0)) { /* crossed commit barrier */ node->dagHdr->status = rf_rollForward; - if (rf_engineDebug || 1) { + if (rf_engineDebug) { printf("raid%d: node (%s) returned fail, rolling forward\n", raidPtr->raidid, node->name); } } else { /* never reached commit barrier */ node->dagHdr->status = rf_rollBackward; - if (rf_engineDebug || 1) { + if (rf_engineDebug) { printf("raid%d: node (%s) returned fail, rolling backward\n", raidPtr->raidid, node->name); } } |
