summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_layout.c
AgeCommit message (Collapse)Author
2008-05-04Both StripeUnitsPerParityUnit and StripeUnitsPerReconstructUnit needoster
to be positive integers.
2008-04-20Introduce a function to return the default head separation for RAID 1oster
sets. This helps ensure that the sliding status window (coming soon!) for reconstructs will always be correct.
2005-12-11merge ktrace-lwp.christos
2005-02-27nuke trailing whitespaceperry
2004-01-04As noted by Thierry Deval in a posting to misc/at/openbsd.org,oster
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.
2003-12-30Some days you wonder if some of the function declaration consistencyoster
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-02-09constify somejdolecek
2002-09-23dataBytesPerStripe is set, but never used. *poof*oster
2002-08-03Cleanup configuration and auto-configuration information printing.oster
Thanks to mrg for the suggestions.
2001-11-13add RCSIDslukem
2001-10-04Step 2 of the disentanglement. We now look to <dev/raidframe/*> foroster
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-01-27Having moved some of the bits needed by raidctl into rf_configure.c, weoster
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.
2001-01-27More #if's. This needs some serious rototillage, but a few #if's willoster
suffice for now.
2001-01-26Give the parity declustering code their own 'RAID arch' types, andoster
allow us to turn them off if desired.
2000-04-17Revert last change (the last change was not necessarily desirable, andoster
had some other minor side-affects that were troublesome).
2000-04-16Don't allow configuration where the specified SectPerSU may result in IO largeroster
than MAXPHYS being sent to underlying devices. Addresses PR#9868. Will change if/when MAXPHYS goes bye-bye.
1999-07-19sectorsPerStripeUnit should be larger than 0. If it isn't, simply fail.oster
(Thanks to Thor Lancelot Simon for noting the problem).
1999-02-05Phase 2 of the RAIDframe cleanup. The source is now closer to KNFoster
and is much easier to read. No functionality changes.
1999-01-26RAIDframe cleanup, phase 1. Nuke simulator support, user-land driver,oster
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.
1998-11-13RAIDframe, version 1.1, from the Parallel Data Laboratory atoster
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.