Commit Graph

75 Commits

Author SHA1 Message Date
oster 8150ff6fbd - don't use rf_PrintUserStats() for recon statistics.
rf_PrintUserStats() was mean for the simulator, and doesn't provide
any real info in kernel-space, especially for reconstructs.
Reconstructing actually renders the stats even more useless, since it
resets them all to zero before the reconstruct starts!

 - since rf_PrintUserStats() is no longer used, nuke it along with the
routines that feed it.  Nothing was using this code, and if we ever
need it again, we know where to find it.
2004-03-13 02:00:15 +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 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 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 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 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 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 5a02af5b21 Adjust _rf_ShutdownCreate() so that it is willing to wait for more
memory.  Since we only now ever "return(0)", just return (void)
instead.

Cleanup all uses of rf_ShutdownCreate() to not worry about
it ever failing.  Shaves another 600 bytes off of an i386 GENERIC kernel.
2004-02-29 04:03:50 +00:00
oster 290ef1fca7 raidPtr->reconControl->percentCompleted only gets used in one
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-04 21:06:04 +00:00
oster a5c20197a4 Add in a bunch of RF_SIGNAL_COND()'s that were missing. Tidy up
a few lines.
2003-12-31 04:13:52 +00:00
oster abbecc25a2 Left-shift another else{} chunk. No functional changes. 2003-12-31 04:00:01 +00:00
oster b7bb3e3c62 left-shift the "else" part of the if(!lp_SubmitReconBuffer) condition.
Cleanup.  No real functional changes, just more readable.
2003-12-31 03:51:28 +00:00
oster 824f2ed930 Negate a condition, and flip if/else parts. Preparation for left-shifting
the (now) else part.  No real functional change.
2003-12-31 03:29:11 +00:00
oster c43fc67d7d 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....]
2003-12-30 21:59:03 +00:00
oster 8b09b35f45 Let's see... raidPtr->recon_done_procs is never set to anything
(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-29 05:58:34 +00:00
oster ee19b085aa - first kick at a major reworking of RAIDframe's memory allocation code:
- 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 03:33:47 +00:00
oster 10f077a0fb [Having received a definite lack of strenuous objection, a small amount
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-12-29 02:38:17 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
simonb 40149dc0bb Remove an assigned-to but unused variable. 2003-04-10 04:11:50 +00:00
dsl bd99e3429d Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).
2003-03-21 23:11:19 +00:00
jdolecek e3c5d7b092 constify some 2003-02-09 10:04:32 +00:00
oster 6ac4a184c4 For reconstructs, move checks for failed components to before the
kernel threads are created.
2002-11-19 01:45:28 +00:00
oster 0cfd5a5b13 Cleanup more printfs. 2002-11-16 16:59:58 +00:00
oster ad8fd01bdf After a rebuild-in-place, a reconstruct, or a copyback, we should
really be updating the component labels.
2002-11-15 03:57:48 +00:00
oster 2eecfbf479 Improve and/or re-arrange a number of locks. While much of the locking is
still a mess, and there are a number of unresolved issues here, this
gets us closer to being happier in LOCKDEBUG land.
2002-10-18 02:46:36 +00:00
oster eb9d6f5ffa Add a missing RF_LOCK_MUTEX(). 2002-10-06 05:32:59 +00:00
oster 0567afd1cf Introduce a temp variable, and allocate the ReconCtrl structure before
we protect raidPtr.  One less thing for LOCKDEBUG to complain about.
2002-10-06 05:23:55 +00:00
oster e875ee2d89 Nuke "baddisk". Thanks to Simon B. 2002-09-23 03:40:28 +00:00
oster 2876788c95 rf_RegisterReconDoneProc() isn't needed.
This is the last of the 'easy' ones that Krister made me aware of.
Total savings on i386 GENERIC kernel: 13151 bytes
RAIDframe in GENERIC is now at: 179033
Thanks again Krister!
2002-09-21 01:25:10 +00:00
oster bc235cf75b Introduce and use RF_DEBUG_PSS, and save a few more bytes. 2002-09-19 22:52:52 +00:00
oster 0c1690c441 One signal will do, thanks. 2002-09-19 22:41:51 +00:00
oster aad979b7eb Cast the RF_DEBUG_RECON net a little wider. 2002-09-17 03:30:33 +00:00
oster 1b1653573f Rename RF_DEBUG_RECONBUFFER to RF_DEBUG_RECON in order to facilitate
disabling other stuff without having to introduce another #define.
2002-09-17 03:21:40 +00:00
oster 55b509f490 Cleanup some comments. 2002-09-16 02:48:34 +00:00
oster 4511efdca0 rf_CheckFloatingRbufCount() is only really useful when debugging the
reconstruct buffer stuff.  #if it out in the general case.
2002-09-16 02:35:17 +00:00
oster 549b1bde93 Cleanup some printf's, and disable some (debugging) output. 2002-09-16 02:25:08 +00:00
oster a2b9142871 Everyone and their dog was using RF_ERRORMSG3 to print out the same
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.
2002-09-14 17:53:57 +00:00
oster 5965f8b92a Disallow 'reconstruct-in-place' on a component that has failed
and has already been reconstructed to a hot spare.
2002-09-09 02:44:17 +00:00
oster 76e98667c5 Nuke a redundant wakeup(). 2002-07-13 20:54:57 +00:00
oster 2ad74785a4 Move a bunch of debugging stuff to be only used if DEBUG is turned on. 2002-01-09 03:10:19 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem a3746e00b7 add RCSIDs 2001-11-13 07:11:12 +00:00
oster 765e00d3de 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.
2001-10-04 15:58:51 +00:00
thorpej cf56c44a86 bzero -> memset 2001-07-18 06:45:33 +00:00
oster 669f5cc5a5 It's silly to need a parity rebuild after a reconstruction has completed.
If we've just reconstructed a disk, then the parity is known to
be correct.  (XXX doesn't hold for RAID 6!)
2001-06-14 02:35:56 +00:00
oster c77d3c20a8 Ensure we update the 'partitionSize' field of the component labels
when doing a reconstruct or a copyback.  If we don't, junk might be
there, and that could cause the component to be not correctly
autoconfigured on reboot.  Thanks to Simon Burge for helping track this down.
2001-01-26 02:16:24 +00:00
oster 0b63accce0 Merge rf_update_component_labels() and rf_final_update_component_labels(). 2000-06-04 02:05:13 +00:00