Commit Graph

636 Commits

Author SHA1 Message Date
oster 37533dd249 Introduce RF_DEBUG_ENGINE and use it to disable a number of debugging
bits in rf_engine.c
2004-03-09 03:10:26 +00:00
oster 82c3abf8e3 Use RF_DEBUG_QUIESCE to #if-out some printfs that really only should
be seen when debugging.
2004-03-09 02:41:21 +00:00
oster 71371823e7 rf_ShutdownList() isn't returning anything useful, and doesn't need to
return anything.  Cleanup.

Cleanup function prototypes in rf_shutdown.h

Use #if RF_DEBUG_SHUTDOWN to #if-out more code.
2004-03-09 02:15:33 +00:00
oster bce42a3095 Move pss_pool to rf_pools. Will save a bit of extra memory at
run-time, and we can only do one reconstruction at a time anyway.
Nuke pss_issued_pool - move it to an internal structure in pss.
2004-03-08 02:25:27 +00:00
oster 8cbd53826e A few more cleanups missed in last commit. 2004-03-08 01:59:26 +00:00
oster acce07be62 Minor cleanup. No functional change. 2004-03-08 01:55:14 +00:00
oster c25748c684 Rename rf_rad_pool_lock to rf_rad_lock. The latter is far more
accurate.
2004-03-07 23:17:44 +00:00
oster f95359dd19 - Introduce rf_pools which contains all of the various global pools used
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 22:15:19 +00:00
oster 834d494bb2 - Introduce rf_pools which contains all of the various global pools used
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 21:57:44 +00:00
oster c31c7c5652 Cleanup function prototypes. 2004-03-07 05:01:15 +00:00
oster dd0716f291 We don't need 2-fault tollerant stuff here in the default case.
Use #if's to conditionalize the code compilation.
(Saves another 1K on i386 GENERIC kernels)
2004-03-07 02:59:25 +00:00
oster 43648c8525 Minor cleanups. No functional changes. 2004-03-07 02:49:23 +00:00
oster d02f580adf - fix up initialization of rf_recond_pool
- introduce rf_reconbuffer_pool and teach rf_MakeReconBuffer() to use it
2004-03-07 02:46:58 +00:00
oster 3f36d142d8 Re-work rf_GenerateFailedAccessASMs() to simplify things a bit.
rf_AllocBuffer() is available, so use it to get buffer space instead
of the previous RF_Malloc() bits.  Saves a few bytes, but more
importantly makes the code much more readable.
2004-03-07 02:25:36 +00:00
oster 9e4fc614fc Pretty up a bit of unused code. 2004-03-06 23:53:31 +00:00
oster 967b00b4ec rf_AllocBuffer() doesn't do anything with its dag_h parameter. Nuke
it, and adjust callers.
2004-03-06 23:52:20 +00:00
oster 54eab15188 Sprinkle a few #if's to ignore some bits that are only used for RAID 6 or PQ stuff. Saves another 3K on i386 GENERIC. 2004-03-06 23:34:27 +00:00
oster dc76c4b111 Minor tabbing cleanup. No functional change. 2004-03-06 22:59:42 +00:00
oster bfeeabba13 Use RF_INCLUDE_PARITY_DECLUSTERING_DS to #if-out more unneeded bits.
(We can't do RF_DISTRIBUTE_SPARE bits without the parity declustering stuff.)
2004-03-05 03:58:21 +00:00
oster 7bd09b0f2b Introduce RF_DEBUG_DAG and use it to #if-out rf_dagDebug sections.
(i386 GENERIC kernel shrinks by 1.6K)
2004-03-05 03:22:05 +00:00
oster a0413593bc - remove the RF_*_INC's, as necessary. They are not needed any more.
- introduce RF_MIN_*'s, as necessary.  These will indicate the
low-water mark for pools as well as the pool_prime() value.
- add pool_setlowat() for the critical pools.
- pool_prime() and pool_setlowat() the raidframe_cbufpool.
- re-order some pool_prime()'s and pool_sethiwat()'s for clarity.
2004-03-05 02:53:55 +00:00
oster a57d045808 Remove a comment that is no longer relevant. 2004-03-04 03:27:30 +00:00
oster b6ec2bc708 Cleanup function prototypes. 2004-03-04 03:14:02 +00:00
oster 516b22a972 Another variable that was only ever initialized. Turf. 2004-03-04 03:02:01 +00:00
oster 5d768c003f Cleanup function prototypes. 2004-03-04 02:55:58 +00:00
oster 708c19adaf Fix mcpair locking issues -- we really don't need the lock held
the entire time we spend in calling rf_DiskIOEnqueue().
2004-03-04 02:49:58 +00:00
oster 409f2e3222 More function prototype cleanups. 2004-03-04 02:26:50 +00:00
oster 5102542bf2 Cleanup function prototype. 2004-03-04 02:25:13 +00:00
oster 65f967653e More leftover 'row' bits now removed. 2004-03-04 01:57:54 +00:00
oster 55cb2c9a0d Cleanup one more leftover 'row' variable. Cleanup function prototypes
in rf_diskqueue.h
2004-03-04 01:53:25 +00:00
oster 6e2928d6d5 resultNum isn't used anywhere. Good-bye. 2004-03-04 00:56:13 +00:00
oster 8b515e1496 rf_bwd1 and rf_bwd2 are holdovers from the "backward" error recovery.
Nuke them, and the little bit of code associated with them.
2004-03-04 00:54:30 +00:00
oster 2fb9f8db54 Nuke some unnecessary casts. No functional changes. 2004-03-03 17:14:46 +00:00
oster 28bd6c8ea2 Introduce RF_REVENT_READ_FAILED, RF_REVENT_WRITE_FAILED and RF_REVENT_FORCEREAD_FAILED.
This removes 3 more RF_PANIC()'s (but we'll currently still panic if any of these cases occur).
fix up a few printf's.
XXX: still needs more cleanup and testing (and be taught to not panic).
2004-03-03 16:59:54 +00:00
oster b2784ea2d7 Cleanup function prototypes. 2004-03-03 16:12:28 +00:00
oster 992f7c8269 - cleanup unneeded 'row' from RF_CallbackDesc_s.
- remove callbackArg2 from RF_CallbackDesc_s -- it is only ever set,
never read.
- now that this is done, all callbacks should only take a single argument,
and we can simplify things further.
2004-03-03 13:29:00 +00:00
oster dc851b8e23 Improve comments on rf_LookupRUStatus(). No functional changes. 2004-03-03 01:02:44 +00:00
oster edf3711f4e Cleanup function prototypes. 2004-03-03 00:58:03 +00:00
oster b3eae139eb - cleanup memory allocation in rf_AllocPSStatus()
- change function signature of rf_LookupRUStatus().  The last argument
is now a pointer to a new PSS, in case one is needed.  Rather than
having rf_LookupRUStatus() allocate a new PSS, we pre-allocate one
beforehand, where necessary, just in case.
- change callers of rf_lookupRUStatus() to deal with the new way of
calling rf_lookupRUStatus().

[no improvement or worsening of parity rebuild/initialization performance.]
2004-03-03 00:45:20 +00:00
oster 564980b994 Another spot where we're willing to wait for pool_get to give us something
useful.
2004-03-02 19:36:21 +00:00
oster a37cdad459 A few more cases where RF_DEBUG_PSS can be used. 2004-03-02 16:40:10 +00:00
oster 79a5cbaf41 DO_WAIT and DO_SIGNAL macros are a bit much, as they are only each used
in one place.  Simplify things a bit.  No functional change.
2004-03-02 16:03:00 +00:00
oster a7e422ac7f We're willing to wait, so we should always get something valid from
pool_get().
2004-03-02 15:55:56 +00:00
oster d2accf5991 Fix more cases where mutex locks were being held longer than necessary.
[For the record: The mcpair mutex is being used to protect mcpair->flag.
mcpair gets allocated before each call to rf_DispatchDAG(), so there is no
other process/thread that could be mucking with it.  It is only used to
detect the completion of a given parity unit, and rf_DispatchDAG()
only uses it to setup the callback argument for rf_MCPairWakeupFunc()
which will be called when the IO completes.  The code after the call
to rf_DispatchDAG() sits and waits for a 'wakeup' on mcpair->cond
(rf_MCPairWakeupFunc() does that).  If mcpair->flag is 0 when
rf_DispatchDAG() completes, then rf_MCPairWakeupFunc() hasn't been
called yet (the IO hasn't completed).  If it is 1, then the IO is
already done, and we continue on our merry way without sleeping.
Thus, we don't need to hold any lock on mcpair while calling
rf_DispatchDAG().]
2004-03-02 15:47:35 +00:00
oster c7eaad6a14 Use RF_ACC_TRACE to #if out more chunks of code related only
to access tracing.  (not turned on yet)
2004-03-01 23:30:57 +00:00
oster e35e293611 We always wait until we get memory, so the NULL check doesn't buy us anything. 2004-03-01 01:12:22 +00:00
oster 63e07285f8 Bah. RF_ACC_TRACE bits need a bit more work before they can be turned off.
Re-enable until all parts can be disabled at the same time.
2004-02-29 23:27:24 +00:00
oster b5e62ef069 As a LOCK_DEBUG kernel complains, we should really initialze
rf_tracing_mutex.
2004-02-29 23:10:58 +00:00
oster 4b8d5fc8b6 Unlock the mcpair mutex before we call rf_DispatchDAG(), and re-lock it once
we are back.  Makes things much happier on SMP boxen.  Problem noted
by SimonB. (Thanks!)
2004-02-29 23:03:30 +00:00
oster e9ec029612 Oops.. might still need this mutex in a few places. 2004-02-29 22:32:37 +00:00