summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_reconutil.c
AgeCommit message (Collapse)Author
2006-04-26un-bitrot some of this code (which is not included by default in kernels),oster
and make it build again. XXX: Paritylogging bits still won't build.
2005-12-11merge ktrace-lwp.christos
2005-02-27nuke trailing whitespaceperry
2005-02-05Vastly improve the error handling in the case of a read/write erroroster
that occurs during a reconstruction. We go from zero error handling and likely panicing if something goes amiss, to gracefully bailing and leaving the system in the best, usable state possible. - introduce rf_DrainReconEventQueue() to allow easy cleaning of the reconstruction event queue - change how we cleanup the floating recon buffers in rf_FreeReconControl(). Detect the end of the list rather than traversing according to a count. - keep track of the number of pending reconstruction writes. In the event of a read error, use this to wait long enough for the pending writes to (hopefully) drain. - more cleanup is still needed on this code, but I didn't want to start mixing major functional changes with minor cleanups. XXX: There is a known issue with pool items left outstanding due to the IO failure, and this can show up in the form of a panic at the tail end of a shutdown. This problem is much less severe than before these changes, and the hope/plan is that this problem will go away once this code gets overhauled again.
2004-03-18Re-work the locking mechanisms for reconstruct and PSS structuresoster
such that we don't actually hold a simplelock while we are doing a pool_get(), but that we still effectively protecting critical code. This should fix all of the outstanding LOCKDEBUG warnings related to rebuilding RAID sets.
2004-03-07- Introduce rf_pools which contains all of the various global pools usedoster
by RAIDframe. Convert all other RAIDframe global pools to use pools defined within this new structure. - Introduce rf_pool_init(), used for initializing a single pool in RAIDframe. Teach each of the configuration routines to use rf_pool_init(). - Cleanup a few pool-related comments. - Cleanup revent initialization and #defines. - Add a missing pool_destroy() for the reconbuffer pool. (Saves another 1K off of an i386 GENERIC kernel, and makes stuff a lot more readable)
2004-03-07- fix up initialization of rf_recond_pooloster
- introduce rf_reconbuffer_pool and teach rf_MakeReconBuffer() to use it
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-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-29Since rf_mutex_destroy() is effectively a NOP now, nuke it.oster
2003-12-29Reduce uses of rf_mutex_init() and rf_cond_init(). Streamlines code,oster
removes useless error detection, and generally makes things easier to follow.
2003-12-29- first kick at a major reworking of RAIDframe's memory allocation code:oster
- all freelists converted to pools - initialization of structure members in certain cases where code was relying on specific allocation and usage properties to keep structures in a "known state" (that doesn't work with pools!). - make most pool_get() be "PR_WAITOK" until they can be analyzed further, and/or have proper error handling added. - all RF_Mallocs zero the space returned, so there is no difference between RF_Calloc and RF_Malloc. In fact, all the RF_Calloc()'s do is tend to do is get things horribly confused. Make RF_Malloc() the "general memory allocator", with RF_MallocAndAdd() the "general memory allocator with allocation list". - some of these RF_Malloc's et al. are destined to disappear. - remove rf_rdp_freelist entirely (it's not used anywhere!) - remove: #include "rf_freelist.h" - to the files that were relying on the above, add: #include "rf_general.h" - add: #include "rf_debugMem.h" to rf_shutdown.h to make it happy about the loss of: #include "rf_freelist.h". This shrinks an i386 GENERIC kernel by approx 5K. RAIDframe now weighs in at about 162K on i386.
2003-12-29[Having received a definite lack of strenuous objection, a small amountoster
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-02-09constify somejdolecek
2002-11-23Bye-bye to the completely unused reconCtrlPtr->priorityList.oster
2002-11-19#if out some stuff that's only used for some distributed sparing stuff.oster
Shaves another 500 bytes from an i386 kernel.
2002-10-07Minor comment and 80-column fixes. No functional changes.oster
2002-09-17Rename RF_DEBUG_RECONBUFFER to RF_DEBUG_RECON in order to facilitateoster
disabling other stuff without having to introduce another #define.
2002-09-16Assign a value to recon_buffer_size in a different way so that theoster
compiler doesn't complain when we change what RF_Free looks like.
2002-09-16'char *arrived' was such a nice variable. Too bad all we ever didoster
with it was malloc/free space for it. *poof*
2002-09-16rf_CheckFloatingRbufCount() is only really useful when debugging theoster
reconstruct buffer stuff. #if it out in the general case.
2002-09-14Everyone and their dog was using RF_ERRORMSG3 to print out the sameoster
sort of error message, over and over again, in different files. Rather than having the same text repeated in multiple .o files, create a couple of little functions to do the printing, and save a bundle of space. Also improves readability of code.
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.
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.