Commit Graph

10 Commits

Author SHA1 Message Date
oster 24b034a69e 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.
2004-01-02 21:41:08 +00:00
oster c43fc67d7d Some days you wonder if some of the function declaration consistency
was just an accident in the first place.  Cleanup function decls and
a few comments.  [ok.. so I wasn't going to fix this many.. but once
you're on a roll....]
2003-12-30 21:59:03 +00:00
oster 10f077a0fb [Having received a definite lack of strenuous objection, a small amount
of strenuous agreement, and some general agreement, this commit is
going ahead because it's now starting to block some other changes I
wish to make.]

Remove most of the support for the concept of "rows" from RAIDframe.
While the "row" interface has been exported to the world, RAIDframe
internals have really only supported a single row, even though they
have feigned support of multiple rows.

Nothing changes in configuration land -- config files still need to
specify a single row, etc.  All auto-config structures remain fully
forward/backwards compatible.

The only visible difference to the average user should be a
reduction in the size of a GENERIC kernel (i386) by 4.5K.  For those
of us trolling through RAIDframe kernel code, a lot of the driver
configuration code has become a LOT easier to read.
2003-12-29 02:38:17 +00:00
oster 23b87a323a bytesPerStripeUnit is set, but never used. Thanks to Simon B. for pointing
this out.
2002-09-23 02:40:07 +00:00
lukem a3746e00b7 add RCSIDs 2001-11-13 07:11:12 +00:00
oster 765e00d3de Step 2 of the disentanglement. We now look to <dev/raidframe/*> for
the stuff that used to live in rf_types.h, rf_raidframe.h, rf_layout.h,
rf_netbsd.h, rf_raid.h, rf_decluster,h, and a few other places.
Believe it or not, when this is all done, things will be cleaner.

No functional changes to RAIDframe.
2001-10-04 15:58:51 +00:00
oster 48301a8dae Nuke: #include "rf_threadid.h". 2000-01-07 03:40:56 +00:00
oster 0014588545 Phase 2 of the RAIDframe cleanup. The source is now closer to KNF
and is much easier to read.  No functionality changes.
1999-02-05 00:06:06 +00:00
oster 1eecf8e491 RAIDframe cleanup, phase 1. Nuke simulator support, user-land driver,
out-dated comments, and other unneeded stuff.  This helps prepare
for cleaning up the rest of the code, and adding new functionality.

No functional changes to the kernel code in this commit.
1999-01-26 02:33:49 +00:00
oster 38a3987b69 RAIDframe, version 1.1, from the Parallel Data Laboratory at
Carnegie Mellon University.  Full RAID implementation, including
levels 0, 1, 4, 5, 6, parity logging, and a few other goodies.
Ported to NetBSD by Greg Oster.
1998-11-13 04:20:26 +00:00