Commit Graph

8 Commits

Author SHA1 Message Date
mrg
4f6a431a93 prepare to convert more raidframe old lock/sleep APIs to mutex/condvar:
- remove RF_DECLARE_EXTERN_MUTEX and RF_DECLARE_STATIC_MUTEX, the qualifier
  can be provided at the use point with the normal define
- rename the *LGMGR_MUTEX() macros to *mutex2() names, and add some more
  defines for use:
	rf_declare_mutex2()
	rf_declare_cond2()
	rf_lock_mutex2()
	rf_unlock_mutex2()
	rf_init_mutex2()
	rf_destroy_mutex2()
	rf_init_cond2()
	rf_destroy_cond2()
	rf_wait_cond2()
	rf_signal_cond2()
	rf_broadcast_cond2()
- use the new names for the configureMutex(), which previous used some combo
  of direct mutex* calls and macros
- convert the node_queue to use a mutex/cv combo
- in rf_ShutdownEngine() and DAGExecutionThread(), also signal the former from
  the latter when it is done and about to exit
- convert iodone_lock to use the new macros
2011-04-27 07:55:14 +00:00
mrg
b19ce40796 convert the iodone_lock to a mutex, and use a condvar for signalling.
this only handles the smallest use of old simple_lock/tsleep/wakeup
APIs inside raidframe, and it points out that cv(9)'s have only one
wait channel per cv, whereas each tsleep() caller can specify a
different wait channel.  this change removes the difference between
normal raidio and waiting for IO during shutdown.

i've tested this one 3 systems, ran atf, and had mlelstv and rmind
review the change.
2011-04-23 06:29:05 +00:00
riz
213d0d6de1 Always return at least one parity region. Fixes PR#44239.
Fix from oster@, code (such as it is) by me.
2011-03-01 22:51:14 +00:00
jld
c943cf459a For RAID sets which have no parity (i.e., RAID level 0) and therefore can
never have a parity map, make the parity map ioctls fail with EINVAL.

This makes `raidctl -m` print a scary-looking error on such sets, which
is an improvement over the previous behavior of falsely claiming that
the parity map would be enabled on the next configuration.
2010-03-14 21:11:41 +00:00
oster
0134fbe7d0 Don't attempt to read or write component label stuff from/to 'dead disks'.
Update used spares with the correct parity map bits too.

Addresses PR#42904 by Louis Guillaume.  Fix confirmed by submitter.
Thanks!
2010-03-03 14:23:27 +00:00
pooka
3c809c1925 include sys/param.h first, as is the convention 2009-11-26 07:35:39 +00:00
kenh
b4bb3813ef On the ARM platform, sys/param.h needs to be before sys/mutex.h, otherwise
sys/device.h will fail compilation (struct kmutex will not be defined
completely).
2009-11-26 01:23:56 +00:00
jld
f1a1ad338d Finally commit the RAIDframe parity map Summer Of Code project.
Drastically reduces the amount of time spent rewriting parity after an
unclean shutdown by keeping better track of which regions might have had
outstanding writes.  Enabled by default; can be disabled on a per-set
basis, or tuned, with the new raidctl(8) commands.

Discussed on tech-kern@ to a general air of approval; exhortations to
commit from mrg@, christos@, and others.

Thanks to Google for their sponsorship, oster@ for mentoring the
project, assorted developers for trying very hard to break it, and
probably more I'm forgetting.
2009-11-17 18:54:26 +00:00