Home | History | Annotate | Download | only in raidframe
History log of /src/sys/dev/raidframe/rf_layout.c
RevisionDateAuthorComments
 1.20  04-May-2008  oster Both StripeUnitsPerParityUnit and StripeUnitsPerReconstructUnit need
to be positive integers.
 1.19  20-Apr-2008  oster branches: 1.19.2;
Introduce a function to return the default head separation for RAID 1
sets. This helps ensure that the sliding status window (coming soon!)
for reconstructs will always be correct.
 1.18  11-Dec-2005  christos branches: 1.18.24; 1.18.38; 1.18.70; 1.18.72;
merge ktrace-lwp.
 1.17  27-Feb-2005  perry branches: 1.17.2;
nuke trailing whitespace
 1.16  04-Jan-2004  oster branches: 1.16.8; 1.16.10;
As noted by Thierry Deval in a posting to misc/at/openbsd.org,
rf_DecrAccessesCountState wasn't in the correct spot in
RF_AccessState_e. Following up on that has resulted in one other
correction. Changing orderings of these states is tricky, and
shouldn't be attempted without some thorough analysis. For the
changes committed, the following analysis is offerred:

1) RAIDframe uses a little state machine to take care of building,
executing, and processing the DAGs used to direct IO.

2) The rf_DecrAccessesCountState state is handled by the function
rf_State_DecrAccessCount(). The purpose of this state is to
decrement the number of "accesses-in-flight".

3) rf_Cleanup_State is handled by rf_State_Cleanup(). Its job is to
do general cleanup of DAG arrays and any stripe locks.

4) DefaultStates[] in rf_layout.c indicates that the right spot
for rf_DecrAccessesCountState is just before rf_Cleanup_State.
Analysis of code for both states indicates that the order doesn't
matter too much, although rf_State_DecrAccessCount() should probably
take place *after* rf_State_Cleanup() to be more correct.

5) Comments in rf_State_ProcessDAG() indicates that the next state
should be rf_Cleanup_State. However: it attempts to get there by using

desc->state++;

which actually takes it to just rf_DecrAccessesCountState! This turned
out to be OK before, since rf_Cleanup_State would follow right after,
and all would be taken careof (albeit in arguably the "less correct"
order).

6) With the current ordering, if we head directly to rf_Cleanup_State
(as we do, for example, if multiple components fail in a RAID 5 set),
then we'll actually miss going trough rf_DecrAccessesCountState), and
could end up never being able to reach quiescence! Perhaps not too
big of a deal, given that the RAID set is pretty much toast by that
point at which such a drastic state change happens, but might as well
have this correct.

The changes made are:
1) Since having rf_State_DecrAccessCount() come after
rf_State_Cleanup() is just fine, change rf_layout.c to reflect that
rf_DecrAccessesCountState comes after rf_Cleanup_State (i.e. they swap
positions in the state list). This means that going to
rf_Cleanup_State after bailing on a failed DAG access will do all the
right things -- the state will get cleaned up, and then the access
counts will get decremented properly. The comment in
rf_State_ProcessDAG() is now actually correct -- the next state *will*
be rf_Cleanup_State.

2) Move rf_DecrAccessesCountState in RF_AccessState_e to just after
rf_CleanupState. This puts RF_AccessState_e in sync with
DefaultStates[]. Fortunately, these states are rarely referred to by
name, and so this change ends up being mostly cosmetic -- it really
only fixes cleanup behaviour for the recent "Failed to create a DAG"
changes.
 1.15  30-Dec-2003  oster 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....]
 1.14  09-Feb-2003  jdolecek branches: 1.14.2;
constify some
 1.13  23-Sep-2002  oster dataBytesPerStripe is set, but never used. *poof*
 1.12  03-Aug-2002  oster Cleanup configuration and auto-configuration information printing.
Thanks to mrg for the suggestions.
 1.11  13-Nov-2001  lukem branches: 1.11.8;
add RCSIDs
 1.10  04-Oct-2001  oster 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.
 1.9  27-Jan-2001  oster branches: 1.9.2; 1.9.4; 1.9.6;
Having moved some of the bits needed by raidctl into rf_configure.c, we
no longer need those bits here. In particular, this file is now only
used in the kernel, and that allows us to clean up a lot of cruft.
 1.8  27-Jan-2001  oster More #if's. This needs some serious rototillage, but a few #if's will
suffice for now.
 1.7  26-Jan-2001  oster Give the parity declustering code their own 'RAID arch' types, and
allow us to turn them off if desired.
 1.6  17-Apr-2000  oster Revert last change (the last change was not necessarily desirable, and
had some other minor side-affects that were troublesome).
 1.5  16-Apr-2000  oster Don't allow configuration where the specified SectPerSU may result in IO larger
than MAXPHYS being sent to underlying devices. Addresses PR#9868.
Will change if/when MAXPHYS goes bye-bye.
 1.4  19-Jul-1999  oster branches: 1.4.2;
sectorsPerStripeUnit should be larger than 0. If it isn't, simply fail.
(Thanks to Thor Lancelot Simon for noting the problem).
 1.3  05-Feb-1999  oster branches: 1.3.2; 1.3.4;
Phase 2 of the RAIDframe cleanup. The source is now closer to KNF
and is much easier to read. No functionality changes.
 1.2  26-Jan-1999  oster 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.
 1.1  13-Nov-1998  oster 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.
 1.3.4.1  02-Aug-1999  thorpej Update from trunk.
 1.3.2.1  27-Sep-1999  cgd pull up rev 1.4 from trunk (requested by oster):
Do not continue the configuration process if sectorsPerStripeUnit is
not larger than 0.
 1.4.2.2  11-Feb-2001  bouyer Sync with HEAD.
 1.4.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.9.6.1  11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.9.4.3  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.4.2  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.4  18-Oct-2002  nathanw Catch up to -current.
 1.9.2.3  13-Aug-2002  nathanw Catch up to -current.
 1.9.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.9.2.1  22-Oct-2001  nathanw Catch up to -current.
 1.11.8.1  29-Aug-2002  gehenna catch up with -current.
 1.14.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.14.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1  03-Aug-2004  skrll Sync with HEAD
 1.16.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.16.8.1  29-Apr-2005  kent sync with -current
 1.17.2.1  11-May-2008  jdc Pull up revision 1.20 (requested by oster in ticket #1930).

Both StripeUnitsPerParityUnit and StripeUnitsPerReconstructUnit need
to be positive integers.
 1.18.72.1  18-May-2008  yamt sync with head.
 1.18.70.1  02-Jun-2008  mjf Sync with HEAD.
 1.18.38.1  03-Jun-2008  skrll Sync with netbsd-4.
 1.18.24.1  11-May-2008  jdc Pull up revision 1.20 (requested by oster in ticket #1140).

Both StripeUnitsPerParityUnit and StripeUnitsPerReconstructUnit need
to be positive integers.
 1.19.2.1  16-May-2008  yamt sync with head.

RSS XML Feed