summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
AgeCommit message (Collapse)Author
2004-01-10Since the LOCK and UNLOCK flags are never used, no need in extracting them.oster
Collapse the related variables down to zero. That means 'flags' is 0 as well. Nuke the extraction macros, a bunch of the variables, and replace 'flags' as well.
2004-01-10store a i/o priority hint in struct buf for buffer queue discipline.yamt
2004-01-10iCleanup the RF_CREATE_PARAM3(). Middle two "arguments" were nothingoster
but 0 in all cases.
2004-01-10More lu_flags disappear into oblivion.oster
2004-01-09Nuke lu_flag and code associated with it being non-zero.oster
The compiler already knew that these chunks of code could never be reached (since lu_flag was always 0), so it already ignored them. No functional changes.
2004-01-09[This file should have been committed with the otheroster
rf_enableAtomicRMW changes.] Cleanup rf_enableAtomicRMW and its use. According to the comments, we can't set this to anything other than zero anyway. Shaves off another 900 bytes. lu_flag's days are numbered now, as are the middle parameters of RF_CREATE_PARAM3.
2004-01-09Cleanup rf_enableAtomicRMW and its use. According to the comments, weoster
can't set this to anything other than zero anyway. Shaves off another 900 bytes. lu_flag's days are numbered now, as are the middle parameters of RF_CREATE_PARAM3.
2004-01-06Clean up a few comments, and improve code formatting somewhat.oster
Makes things a bit more readable. No functional changes.
2004-01-05remove terminate_disk_queues from RF_Raid_s. The hist_diskreq[]oster
stuff is only used for the CHAINDECLUSTERING, so hide it with an #if.
2004-01-04raidPtr->reconControl->percentCompleted only gets used in oneoster
debugging printf, and in rf_netbsdkintf.c. We can do the calculations inside of RF_DEBUG_RECON for the one debugging printf, and only perform the percentCompleted calculation "on demand" in the rf_netbsdkintf.c case. Shaves a few more bytes off an i386 GENERIC kernel, and ever-so-slightly decreases the amount of work performed during a reconstruct.
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.
2004-01-02Fix the "We panic if we can't create a DAG" problem that's existedoster
~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-02Remove "row" from DEBUG statements.hannken
2004-01-01Cleanup some unused desc->flags:oster
RF_DAG_RETURN_DAG RF_DAG_RETURN_ASM RF_DAG_TEST_ACCESS and the code that goes with them. A couple more of these can probably go too, but I might need them in a bit.
2004-01-01Finally cleanup RF_BZERO. Turns out that 'bp' was only used to obtainoster
bp->b_proc for mapping userspace buffers to kernelspace in the original rf_kintf.c. That means bp isn't of any use in RF_BZERO() for us, and the macro can be replaced with just the memset(). No functional changes.
2004-01-01Tidy up the #includes a bit.oster
2004-01-01Nuke a few more 'row'-related bits that were missed in the row-removal.oster
2004-01-01Nuke a bunch of unused variables:oster
- node_queue_cond - quiescent_cond - eq_cond - desc->cond - desc->head - diskqueue->numWaiting Nuke rf_print_unable_to_init_cond(). Nuke rf_TerminateDiskQueues prototype from rf_diskqueue.h.
2003-12-31Remove 3 unused debugging options:oster
RF_DBG_OPTION(accessTraceBufSize, 0) RF_DBG_OPTION(disableAsyncAccs, 0) RF_DBG_OPTION(suppressTraceDelays, 0)
2003-12-31Clean up a bunch of comments.oster
2003-12-31Replace the DO_FREE() macro with just RF_Free(). No functional changes,oster
just less confusion.
2003-12-31Fix comments and make function declarations conform.oster
No functional changes.
2003-12-31Add in a bunch of RF_SIGNAL_COND()'s that were missing. Tidy uposter
a few lines.
2003-12-31Left-shift another else{} chunk. No functional changes.oster
2003-12-31left-shift the "else" part of the if(!lp_SubmitReconBuffer) condition.oster
Cleanup. No real functional changes, just more readable.
2003-12-31Negate a condition, and flip if/else parts. Preparation for left-shiftingoster
the (now) else part. No real functional change.
2003-12-31Remove a couple of incorrect comments. (rf_recon_req needs to beoster
passed to rf_ReconThread(), and there's no way around that for now.)
2003-12-31init_dqd and clean_dqd don't do enough to be their own functions,oster
and just serve to cause confusion. Back-merge their contents to their (only) calling spots and nuke them.
2003-12-31Increase the scope of RF_DEBUG_PSS to cover a bit more stuff.oster
2003-12-31nuke the 'bp' argument to rf_bxor and friends since it is no longer used.oster
In fact, bp was being set to "NULL" when passed rf_bxor() in rf_parityscan.c:rf_VerifyParityBasic().
2003-12-30Very carefully remove REMAP_VA() macro. It's only doing a simpleoster
assignement, and the 'bp' argument isn't used. (Guess what's going to disappear next?) No functional changes.
2003-12-30Nuke a forgotten 'row' from struct RF_PerDiskReconCtrl_s.oster
2003-12-30sparediskids isn't used anywhere. turf.oster
2003-12-30No point keeping 'pt' around. It's only ever assigned to.oster
2003-12-30rf_FreePDAList() and rf_FreeASMList() wern't using their l_end oroster
count arguments. Nuke the unused args, and fix up callers and fn prototypes. Rename l_start arguments.
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-12-30Make function declarations consistent a) with each other and b) withoster
KNF. Clean up comments.
2003-12-30Fix slight bogon from row removal. 'r' would have been 0 here, not 1,oster
which means r*raidPtr->numCol would have always been 0, not raidPtr->numCol.
2003-12-30access_tracebuf is declared, allocated, and freed. No freeloadingoster
datastructures allowed! Punt. accessTraceBufCount, rf_accessTraceBufSize, and rf_stopCollectingTraces are similarly declared, initialized, and then never changed. Punt. rf_ShutdownAccessTrace() now does nothing. Remove it, and the callback setup stuff from rf_ConfigureAccessTrace().
2003-12-29Clean up comments, and generally make more readable. No functional changes.oster
2003-12-29Clean up code/comments. No functional changes. Just a lot easier to read now.oster
2003-12-29The ugly wonderment of appropriately placed ASCII charactersoster
formerly known as rf_threadstuff.c is no more.
2003-12-29rf_lkmgr_mutex_init() is only called from one spot, and it reallyoster
can't fail. Simplify life in rf_BootRaidframe(), and then nuke rf_lkmgr_mutex_init(). Cleanup rf_threadstuff.h a bit more too. rf_threadstuff.c is about to Go Away.
2003-12-29Garbage-collect a whole mess of this RF_THREADGROUP_* stuff that isn'toster
being used. Then, nuke rf_init_managed_threadgroup() and all descendants and relations.
2003-12-29Let's see... raidPtr->recon_done_procs is never set to anythingoster
(other than NULL when raidPtr is initialized). That means SignalReconDone() never does anything useful. Bye-bye! Say good-bye to recon_done_procs and recon_done_procs_mutex (and its initializer) as well.
2003-12-29IO_BUF_ERR really doesn't need to be a macro. Replace the macro.oster
2003-12-29_rf_create_managed_cond() is now left doing nothing. Convert callers.oster
Mash DO_RAID_COND in rf_driver.c out of existance. - Nuke (already #if 0'ed) _rf_create_managed_lkmgr_mutex() while we're busy here. simplify DO_INIT in rf_engine.c
2003-12-29cond_destroyer joins mutex_destroyer in the "nothing useful is doneoster
here" department. remove _rf_init_threadgroup() and rf_destroy_threadgroup() which were already #if 0'ed. rf_cond_destroy() does nothing. Nuke it, and all callers. rf_cond_init() doesn't deserve to be a separate function any more. Fix up the remaining 3 callers, and nuke rf_cond_init(). Another 0.4K goes "poof", but still no functionality lost!
2003-12-29_rf_create_managed_mutex() is doing just a simple:oster
rf_mutex_init(m) now. The rest of the fluff is no longer needed. It also cannot fail, so error checking on rf_create_managed_mutex() is just wasting space. Nuke the #define's associated with rf_create_managed_mutex(). Convert rf_create_managed_mutex(listp,m) to just rf_mutex_init(m). Remove wasteful "error checking" and simplify all instances where this is called. (another 0.3K saved in the binary, but the real savings is in code readability!)
2003-12-29mutex_destroyer() has been reduced to nothing. Turf it.oster
That means there is no point in having any of the shutdown stuff call mutex_destroyer() on any of the mutexes. Nuke related code.