Commit Graph

471 Commits

Author SHA1 Message Date
oster
93e77ce121 Nuke all (but one) of the remaining RF_UTILITY's. 2002-11-23 02:44:14 +00:00
oster
ceb8b43d54 Nuke some #if 0'ed code. 2002-11-23 02:38:59 +00:00
oster
d8bae03774 One less goto. 2002-11-23 01:59:59 +00:00
oster
a14698a359 Bye-bye to the completely unused reconCtrlPtr->priorityList. 2002-11-23 01:58:18 +00:00
oster
540f566858 rf_SelectMirrorDiskPartition() is only needed in a few cases. #if it
out in the rest.  Thanks to Krister!
2002-11-22 20:56:10 +00:00
oster
9768cda12b Fix up locking on a call to rf_update_component_labels().
Noticed by Manuel.  Thanks Manuel!
2002-11-21 15:37:55 +00:00
oster
58ac277dd0 #if out some stuff that's only used for some distributed sparing stuff.
Shaves another 500 bytes from an i386 kernel.
2002-11-19 01:49:41 +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
61c0bdf3d3 #if 0 an unused function. Noted by Krister. Thanks! 2002-11-18 23:50:47 +00:00
oster
b43d46d578 rf_DiskReadMirrorPartitionFunc() is only needed for some of the clustering
stuff, or if we're doing DAG validation.  Thanks to Krister!
2002-11-18 23:46:28 +00:00
oster
7a58f70fb2 When setting root or autoconfig status, be sure to update used_spares too! 2002-11-17 22:41:36 +00:00
oster
0cfd5a5b13 Cleanup more printfs. 2002-11-16 16:59:58 +00:00
oster
c00752f98a Clean up error reporting, and nuke some printf verbosity. 2002-11-16 16:49:46 +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
35f6622aa7 These printf's have outlived their usefulness. *poof* 2002-11-15 03:00:12 +00:00
oster
56f6918fef rf_markalldirty() needs to update the mod_counter for used_spares too!
This bug appears as "incorrect Mod Counters" in 'raidctl -s'.  The
reason it was seen only in 'raidctl -s' is because of the conditions
needed to trigger the bug:
  a) a raid set is configured
  b) no partitions on that set are mounted or are otherwise in-use
  c) a component is failed, and subsequently rebuilt to a hot spare
  d) the machine is rebooted while something (e.g. 'raidctl -s') has
the device open (and, therefore, rf_markalldirty() has been called)
but before the final rf_update_component_labels() is done.

Needless to say, the window for this happening is *very* small, and it
was only because I was testing some obscure stuff that I even noticed it.
2002-11-14 17:11:54 +00:00
oster
f03dc09c94 Don't allow failing more than one component of a set, or
failing a component that has been spared, or "double-failing"
an already failed component.  XXX This isn't the right place to fix
this, but better here than no-where (and I'm hoping to move it sometime
soon).
2002-11-14 03:04:20 +00:00
oster
bd2dd01d29 xorBufCount needs to be initialized too! 2002-11-12 00:01:32 +00:00
oster
1ac4be5d3e Nuke a printf() from rf_FailDisk(). 2002-11-09 19:50:03 +00:00
mrg
603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
oster
661b040860 Poolify callback descriptor allocation. While some of the underlying
problems just get shuffled around a bit, we do play more nicely with
LOCKDEBUG now.
2002-10-25 03:14:37 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
oster
08933e5968 Better protect hot-spare adding, and make it LOCKDEBUG friendly. 2002-10-22 03:15:28 +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
4eb16a0a4f bye-bye to RF_FREELIST_GET_INIT_ARG and RF_FREELIST_FREE_CLEAN_ARG
whos services are no longer needed after poolification of PSS structures.
2002-10-11 02:15:57 +00:00
oster
9401ec32c0 poolify the allocation of Parity Stripe Status structures.
XXX: Current code may have problems if kernel memory is completely depleted.
This is, unfortunately, not the only chunk of RAIDframe code to have
this problem, and will have to be dealt with. :(
2002-10-11 02:10:08 +00:00
oster
16f8b30fa2 Minor comment and 80-column fixes. No functional changes. 2002-10-07 04:05:55 +00:00
oster
644e9151d0 poolify the RF_ReconMapListElem_t's used by rf_ReconMapUpdate().
Gives LOCKDEBUG kernels one less thing to complain about.
2002-10-06 18:49:12 +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
6108856337 update_size() does some bookkeeping, but nothing ever reads the data
it gathers.  Nuke it.  Without update_size, FreeReconMapListElem() can
do without mapPtr.  That, in turn, means crunch_list() doesn't need a
mapPtr either.
2002-10-05 22:45:46 +00:00
oster
e29eccb29a RU_NIL is not used. Remove it. 2002-10-05 16:10:41 +00:00
oster
150a2e7941 Minor cleanup. No functional changes. 2002-10-04 23:49:35 +00:00
oster
40e0eab4fd Clean up #includes. Group function prototypes. Fix more 80-column lossage
that was missed before.  Cleanup a printf.
2002-10-04 22:56:54 +00:00
oster
ad11d11dc2 Undo the change from 1.16->1.17, and 1.19->1.20. The ltsleep and locking
that was there before before is just fine, and plays nicely with LOCKDEBUG
now that we've added the raidio thread.
2002-10-04 22:50:26 +00:00
oster
dfd9bc2a73 Tidy up comments and do some 80-column fixing. No functional changes. 2002-10-04 22:35:08 +00:00
oster
8bdc70d040 As part of the effort to get RAIDframe playing nicely with LOCKDEBUG,
rework how completed requests are handled.  In particular, instead of
doing all sorts of work and locking in interrupt context, completed
requests are now queued.  A new kernel thread (rf_RaidIOThread) now
handles calling rf_DiskIOComplete() and (req->CompleteFunc)() for each
completed request.  There is still work to be done to make RAIDframe
LOCKDEBUG friendly, but this change is a huge step forward.

Reviewed by (and many thanks to): thorpej
2002-10-04 20:05:14 +00:00
oster
9fbf5b5d27 Create a thread creation macro that make it easier to name the DAG process.
Use it to have the DAGExecutionThread have a better name for each RAID
process ('raid0', 'raid1', etc., vs. just 'raid', 'raid', etc.)
2002-10-02 21:48:00 +00:00
oster
1ebb206e58 We're going to need rf_lkmgr_mutex_destroy() sooner than I thought. 2002-10-02 15:18:12 +00:00
oster
0e45bff1d4 Since we are unlocking the lock before sleeping, there is no need
to use ltsleep() when a tsleep() will suffice.  Makes RAIDframe+LOCKDEBUG
play together much better.
2002-10-02 14:38:53 +00:00
thorpej
2b99f7cc34 Add a generic config finalization hook, to be called once all real
devices have been discovered.  All finalizer routines are iteratively
invoked until all of them report that they have done no work.

Use this hook to fix a latent bug in RAIDframe autoconfiguration of
RAID sets exposed by the rework of SCSI device discovery.
2002-10-01 18:11:57 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej
d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
oster
6d1870476a Nuke some ancient debugging code. 2002-09-24 00:53:58 +00:00
oster
8a5a36de43 Cleanup the comment formatting a bit. 2002-09-24 00:12:55 +00:00
oster
f0efca630a Nuke a couple of unneeded #defines. 2002-09-23 23:53:54 +00:00
oster
3ea42f1599 lockTable is not needed for AddToWaitersQueue(). Thanks to Simon B.
(cleanup a couple comments while I'm here.)
2002-09-23 04:34:46 +00:00
oster
8f2c8387e2 Nuke a couple of unreached 'break's. Thanks (again) to Simon B. 2002-09-23 04:19:05 +00:00
oster
eb144de792 The 'reconDesc' argument to rf_SignalQuiescenceLock() is a holdover from
simulation code. *poof*  Thanks to Simon B.
2002-09-23 04:14:20 +00:00
oster
7db6bcd2ed CheckCvscanState never prints the file and line number. Thanks to Simon B. 2002-09-23 04:02:29 +00:00