Commit Graph

896 Commits

Author SHA1 Message Date
erh
e2e97e1dc7 Statically initialize the raidautoconfig variable when RAID_AUTOCONFIG is set,
instead of setting it in code, so it can easily be checked and changed in an
on-disk kernel with gdb.  Use a separate raidautoconfigdone variable to keep
track of whether raid configuration has actually occurred.
2011-11-05 16:40:35 +00:00
hannken
2cc7a01f10 Change the vnode locking protocol of VOP_GETATTR() to request at least
a shared lock.  Make all calls outside of file systems respect it.

The calls from file systems need review.

No objections from tech-kern.
2011-10-14 09:23:28 +00:00
mbalmer
5ff9b946b6 Newline is \n, not /n. 2011-09-07 07:43:05 +00:00
plunky
7f3d4048d7 NULL does not need a cast 2011-08-31 18:31:02 +00:00
oster
28c3372a95 Address part of PR kern/44972. From YAMAMOTO Takashi. Thanks! 2011-08-03 15:00:29 +00:00
oster
6f6c76259e Remove unused 'struct lwp *' from rf_getdisksize. No functional changes. 2011-08-03 14:44:38 +00:00
mbalmer
631d5867a0 According to the Oxford Dictionary of Etymology, a wether is a male sheep
or ram.
2011-08-01 12:28:53 +00:00
jmcneill
d2b1c474ba Add an FSILENT flag and use it to suppress "Medium Not Present" scsipi
spam when trying to access offline drives at boot.
2011-07-30 12:08:36 +00:00
oster
d1aa4a0857 In rf_disks.c make sure ser_values and ser_count arrays are
initialized before use.

Validate the component label before considering a component for use,
and make sure we only consider components that are optimal.

Fixes PR#44251.  All atf RAIDframe tests now pass.
2011-07-29 19:55:50 +00:00
yamt
33d93c8dcc rf_ReconstructInPlace: don't leave a vnode open on errors.
fixes a part of PR/44972.
2011-05-28 00:53:04 +00:00
yamt
c44faaeacb don't forget to destroy mutex. 2011-05-27 22:48:24 +00:00
buhrow
463102d28a Suggested to oster@ and approved via private e-mail as a help to
people who are getting reconstruction failures.
2011-05-24 07:33:41 +00:00
joerg
f62ac60184 rf_panicbuf is already format, so don't pass it as format string to
panic()
2011-05-23 21:49:35 +00:00
mrg
8c36bb4b69 convert the main raidPtr mutex to a kmutex, and add a couple of cv's to
cover the old sleep/wakeup points for adding_hot_spare and waitForReconCond.
convert all remaining simple_lock's to kmutexes (they're not used or compiled
right now... even with all options enabled) and remove the support for them.

this leaves just a pair of tsleep()/wakeup() calls using old scheduling APIs.
2011-05-11 18:13:12 +00:00
mrg
30308cb715 convert regionBufferPool.mutex/cond and parityBufferPool.mutex/cond
to kmutex/cv.
2011-05-11 06:20:33 +00:00
mrg
c57ca1d4fb convert parityLogPool.mutex to a kmutex. 2011-05-11 06:03:06 +00:00
mrg
662e58c786 convert regionInfo[regionID].mutex to a kmutex. 2011-05-11 05:14:07 +00:00
mrg
3dd617695f convert reintMutex to a kmutex. 2011-05-11 03:38:32 +00:00
mrg
32ab76b94a convert parityLogDiskQueue.mutex to a kmutex/cv.
XXX: some splbio() usage to clean up here
2011-05-11 03:23:26 +00:00
mrg
1c0dbcb69c convert RF_CommonLogData_s/RF_ReconMap_s mutex to a kmutex/cv. 2011-05-10 07:04:17 +00:00
mrg
de9a772ed6 print "raidN: detached" when unconfiguring a raid device. 2011-05-10 05:08:51 +00:00
mrg
a8b7159c16 convert stripelocks to kmutex. 2011-05-05 08:21:29 +00:00
mrg
c4fdb0522f RF_BROADCAST_COND() is no more. 2011-05-05 08:21:09 +00:00
mrg
710e439b0e convert access_suspend_mutex to a kmutex/cv. 2011-05-05 07:12:58 +00:00
mrg
ec1c557b57 convert the diskqueue mutex into a kmutex 2011-05-05 06:04:09 +00:00
mrg
50fe584a38 finish porting mcpair users to kmutex, and fix a couple of declarations
in rf_netbsdkintf.c.  fixes i386/conf/ALL build.
2011-05-05 04:20:51 +00:00
mrg
15d13d88fa convert the pssTable mutex into a kmutex/cv. 2011-05-03 08:18:43 +00:00
mrg
02d186e1e2 convert rb_mutex to a kmutex/cv. 2011-05-02 07:29:18 +00:00
mrg
05ec7078b4 use a unique wchan identifier for node_queue_cv than the old default. 2011-05-02 01:14:06 +00:00
mrg
70f1be105d re-apply the reverted previous, after fixing the missed wakeup:
convert eq_mutex to a kmutex/cv.
convert ltsleep() used for plain timeout into kpause().
2011-05-02 01:07:24 +00:00
mrg
a0ccbf8109 rever the previous for now; it hangs reconstruction. 2011-05-02 00:39:37 +00:00
mrg
393bf63659 convert eq_mutex to a kmutex.
convert ltsleep() used for plain timeout into kpause().
2011-05-01 10:01:01 +00:00
mrg
44be382b63 convert rf_debug_mem_mutex to a kmutex, and fix RF_DEBUG_MEM option. 2011-05-01 06:49:43 +00:00
mrg
14b1a44c1b convert rf_tracing_mutex to a kmutex. 2011-05-01 06:22:54 +00:00
mrg
480f8c7b98 convert the (unused) rf_sparet_wait_mutex to a real mutex/cv. 2011-05-01 05:44:47 +00:00
mrg
14a4134463 convert mcpair to kmutex. 2011-05-01 01:09:05 +00:00
mrg
2b448af86b - convert rf_printf_mutex to a kmutex
- convert rf_rad_lock and the per-raid "cv" to per-raid kmutex/and real cv
- use rf_mutex_init() in places, and move it with the similar definitions
2011-04-30 01:44:36 +00:00
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
d9a6814d47 move the iodone setup and tear down into rf_engine.c. this fixes
"raidctl -u" and should also help the case where we fail to setup
a device part of the way through.
2011-04-23 22:22:46 +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
mrg
d85d9a6541 apply the fix_label hack to partitionSizeHi as well. it's needed there.
to do so, move the call to fix the label inside of rf_reasonable_label()
itself, so we can fix the partition sizes before calling
rf_component_label_partitionsize() itself.

fixes the failure mode where i had garbage not in numBlocksHi but in
partitionSizeHi, and the check against rf_component_label_partitionsize()
would fail and my raid would not auto-configure.
2011-03-18 23:53:26 +00:00
oster
01b117db0c Remove bogus RF_ASSERT that must have crept in by accident.
Thanks to Jan-Hinrich Fessel for reporting the issue.
2011-03-04 17:45:17 +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
enami
ec02ea412c Define accessors for number of blocks and partition size in the
component label and use them where appropriate.  Disscussed on tech-kern.
2011-02-19 07:11:09 +00:00
enami
3e0d3a901e Remove one of trailing whitespace which adds unnecessary difference
against netbsd-5 branch.
2011-02-13 06:17:35 +00:00
rmind
9b6bd2d968 Remove clause 3 (UCB advertising clause) from the University of Utah
copyright.  Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
2011-02-08 20:20:06 +00:00
christos
b9d27ca2f7 PR/44340: Brian Buhrow: Raid sets containing wedges cannot be unconfigured
and reconfigured without a reboot.
2011-01-07 19:52:18 +00:00
christos
77f905cbb0 print the error code for writing parity. 2010-12-22 05:51:19 +00:00
mrg
cad3665385 add a hack to fix up old labels that do not have zero's in numBlocksHi:
if the total sectors reported (via disklabel or otherwise) is smaller
than 2^32, but numBlocksHi is set, zero it out instead.

tested by myself and christos, should fix reports of weirdness seen.
2010-12-11 03:12:10 +00:00
christos
157bda91a0 PR/44207: Wolfgang.Stukenbrock:
memory-leak in raid-ioctl(RAIDFRAME_GET_COMPONENT_LAB
2010-12-08 16:18:06 +00:00