Commit Graph

501 Commits

Author SHA1 Message Date
oster fc178c4727 Add a new debugging #define: RF_DEBUG_STRIPELOCK 2002-09-11 02:51:21 +00:00
oster cdb79dd4ae Nuke unneeded #include "rf_debugprint.h" 2002-09-11 02:22:49 +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 23f63d631e On a 'raidctl -f' or 'raidctl -F', close the failed component.
Thanks to Grant and Matt (phone) for poking me about this.
2002-09-09 01:54:53 +00:00
oster b07b6381d5 Protect rf_PrintDAGList() in a few more places. Thanks to Monroe Williams
on current-users for the patch.
2002-09-07 23:11:46 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
oster 2a80a0fbe1 make 'configureMutex' be a lockmgr lock instead of a simple lock.
The result is MUCH fewer complaints with kernels compiled with LOCKDEBUG.
2002-08-08 02:55:36 +00:00
oster 7c2df6a96d Initial kick at some functions to provide lockmgr lock support
instead of only simplelock support.
2002-08-08 02:54:29 +00:00
oster 813fbd6152 RF_LOCK_MUTEX()/RF_UNLOCK_MUTEX() often cover more code than they
needs to.  In particular, they often surround calls to malloc().
Re-work the locking on most macros to avoid this problem.

XXX: On MP systems, simultaneous calls to the GET macros when a
freelist is empty may cause that freelist to grow more quickly than
before.  Given that the "increment" value of these lists are fairly
small, this shouldn't be too much of an issue.
2002-08-08 02:53:01 +00:00
oster 9c2db4ef79 Let's not bother poking CD's to see if they might have RAID sets
on them.
2002-08-07 20:45:39 +00:00
oster 2a9c8b7cfd One less debug option. 2002-08-04 03:33:04 +00:00
oster 522009f8a9 Nuke some unneeded #includes. 2002-08-04 03:27:04 +00:00
oster 1387eac16b Remove a couple of options that are obsolete. 2002-08-04 03:26:39 +00:00
oster 6ad082845f Let's just say that the way things were stored in the array for the
debugging buffer made it much less useful than it appears.  More memory
for other things now.
2002-08-04 03:22:07 +00:00
oster 354a8ea84b Improve error messages. 2002-08-03 01:24:03 +00:00
oster 48a3ce178f Nuke function prototypes for previously nuked functions. 2002-08-03 01:07:53 +00:00
oster 91d1d5d729 Nuke two more functions that arn't used anywhere and are only contributing
to kernel bloat.
2002-08-03 01:06:48 +00:00
oster 35940367a4 Cleanup configuration and auto-configuration information printing.
Thanks to mrg for the suggestions.
2002-08-03 00:55:54 +00:00
oster 61015077a7 Backout some "new stuff" that accidentally got included on the last commit. 2002-08-03 00:38:42 +00:00
oster d64a7f44ce - AuxFunc is no longer used.
- cleanup function prototypes in rf_diskqueue.h
2002-08-02 04:01:51 +00:00
oster 5dcdb1e4d9 It appears that nothing is using rf_CreateDiskQueueDataFull. Make it even
harder to do so by removing it.
2002-08-02 03:55:13 +00:00
oster 475b3447d1 Bye-bye to the memchunk files. 2002-08-02 03:48:14 +00:00
oster 8ffec04f7c rf_memchunk.c is no longer needed. 2002-08-02 03:47:48 +00:00
oster 752e8eb5c8 - remove "#include "rf_memchunk.h"
- nuke the call to rf_ConfigureMemChunk() from rf_driver.c
2002-08-02 03:42:33 +00:00
oster fcc4232f71 Nuke stuff dealing with the experimental memChunk code. It's unused, and
currently only contributing to bloat.
2002-08-02 03:32:56 +00:00
oster f8388364aa - remove memChunkEnable as an arg to InitHdrNode 2002-08-02 01:15:22 +00:00
oster bf72c7334c Unused code go bye-bye. 2002-08-02 00:24:56 +00:00
oster de6f092d9d RAIDframe doesn't need to be so chatty on autoconfigure. Leave it
a chatty if DEBUG is set... (for now..)
2002-07-24 02:55:22 +00:00
oster 4c591ca7bc Don't print the value of protectedSectors all the time. 2002-07-24 02:17:14 +00:00
hannken 7de36862a8 Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.
2002-07-21 15:32:17 +00:00
hannken 856bd17f66 Convert to new device buffer queue interface. 2002-07-20 16:30:18 +00:00
oster 9a86d198bb Oops... one more #include can disappear. 2002-07-14 03:20:12 +00:00
oster 1c1010f7e7 Nuke unneeded #include. 2002-07-14 03:16:06 +00:00
oster 3995c18b9e Remove incorrect comment. 2002-07-14 03:04:02 +00:00
oster 76e98667c5 Nuke a redundant wakeup(). 2002-07-13 20:54:57 +00:00
oster ef989419d9 Nuke a redundant check. 2002-07-13 20:51:54 +00:00
oster bc8ead0c0a Most folks won't need the DAG printing and verification routines.
Introduce a #define to toggle them on/off.  Disable calls to
rf_PrintDAGList().  Saves ~6K on GENERIC+DEBUG kernel on i386.
2002-07-13 20:14:33 +00:00
oster 1beb201fc3 rf_ValidateDAG isn't something that we want to even consider
calling unless DEBUG is turned on.
2002-07-13 20:01:13 +00:00
oster 28ce42a2bb Minor cleanup. 2002-07-13 19:59:26 +00:00
oster 33643c74c5 rf_compute_workload_shift() is only used by the CHAINDECLUSTER stuff,
so only include it if needed.
2002-07-13 19:56:55 +00:00
oster 69fb0af058 Nuke a redundant check that raidPtr->valid is true. 2002-07-13 19:35:34 +00:00
oster 8fcfe433d8 No need to unlock and then immediately relock a mutex. 2002-07-13 17:47:44 +00:00
oster 38f0cae9e2 - don't be quite so chatty.
- if we need to print stuff, print out which raid device the information
is related to  (where applicable).
2002-07-13 17:24:41 +00:00
oster 73eaafcf06 As suggested by MRG, if we have an autoconfig set for root, we should
set booted_device, even if RB_ASKNAME is set.  That way the appropriate
device gets set as the default when it asks where you want to look for /.
2002-07-13 17:04:09 +00:00
oster acb6f97235 Cleanup unneeded #includes. 2002-07-13 16:53:44 +00:00
leo 4fdfe6f24c Exclude the Atari/Milan floppy driver from being a RAID capable device. 2002-06-27 05:13:33 +00:00
leo c80fa51681 Not so fast... Add a bit of comment to the previous change. 2002-05-23 15:12:59 +00:00
leo 2ac118b51f Treat the "hdfd" (Atari/Hades floppy) like all the other "fd"s. OK-ed by
Greg Oster.
2002-05-23 15:03:33 +00:00
wiz 45bbb2368f bcopy -> memcpy. Reviewed by Greg Oster. 2002-05-22 15:40:47 +00:00
thorpej bbb03955e8 Centralize the RAIDframe config definitions. 2002-04-16 20:33:00 +00:00
thorpej a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
wiz 1b7f309f0a Correct misspellings of "failed". 2002-03-04 01:38:31 +00:00
oster 71a4ca8acd Bah.. Not sure how those ";"'s got missed :-( 2002-01-19 22:20:48 +00:00
oster 9872e4c410 Let's not bother building a number of infrequently used RAID types.
The code is still there if people want it, but these other RAID
types (using various DECLUSTERING and SPARING techniques) arn't being
used in practise.  Saves about 100K on i386 GENERIC kernels.
2002-01-19 02:50:54 +00:00
oster e38e358cb2 Only include some debugging printf's if DEBUG is defined. 2002-01-19 01:51:51 +00:00
thorpej bd4e2862b0 We only need a single component buffer pool. 2002-01-09 04:21:43 +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
oster 19c2127b85 Revert previous. Need to be more careful with what gets chopped out. 2002-01-07 05:30:53 +00:00
oster 345de5b80a Some of this stuff is really just for debugging, so compile it only if
DEBUG is defined.
2002-01-07 02:27:42 +00:00
oster af9b7112ab #if 0 rf_SetReconfiguredMode() since it is unused now, but may be
needed someday.
2002-01-07 01:58:03 +00:00
oster 3b488c3f27 Fix an off-by-one error when autoconfig is hunting for a free RAID
device in the rare event that the one it wants is already in use.
Thanks to Wolfgang Stukenbrock for noticing the bug and filing the PR.
This fix addresses PR#14862.
2001-12-16 22:57:32 +00:00
lukem 371fd3fc10 use #ifdef RAID_AUTOCONFIG (for consistency with the rest of the kernel) 2001-11-28 05:39:13 +00:00
oster d11d1bd6fe Cleanup some whitespace that indent got wrong a long time ago. 2001-11-20 02:37:29 +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 525f4a9bed Backout a line that accidentally got included when the .h reorg went in. 2001-10-06 00:47:46 +00:00
oster 035a63f6d3 More #if 0's bite the dust. 2001-10-05 15:41:23 +00:00
oster 9d1d665dac Nuke some #if 0 stuff. 2001-10-05 15:33:12 +00:00
oster d00ed4116f Tidy up the #includes a bit. (coulda/shoulda done that with last commit.) 2001-10-04 17:42:29 +00:00
oster 2621bd1124 rf_options.h isn't needed here. 2001-10-04 17:41:17 +00:00
oster aa7a54f593 If rf_options.h needs to be include it, then include it. Don't rely on
another .h file to pull it in.
2001-10-04 17:39:18 +00:00
oster dad0d4578c Nuke a couple of unused extern variable declarations. 2001-10-04 17:31:01 +00:00
oster 32c731329a These have been completely replaced by raidframevar.h and raidframeio.h. 2001-10-04 16:08:51 +00:00
oster fe686dfde7 Setup installation mechanism for <dev/raidframe/raidframevar.h> and
<dev/raidframe/raidframeio.h>
2001-10-04 16:04:16 +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
oster 46a6eb1477 Step 1 of the disentangling of RAIDframe's .h files:
raidframevar.h - contains bits of rf_types.h, rf_layout.h,
rf_netbsd.h, rf_raid.h, and rf_decluster.h.

raidframeio.h - contains the bits needed for doing IOCTL's w/
RAIDframe.

These bits will be visible to userland.
2001-10-04 15:43:57 +00:00
oster d7a81df519 RF_DEV2RAIDID isn't used anywhere anymore. Bye bye. 2001-09-26 03:01:19 +00:00
oster de43684ab7 - rf_types.h doesn't really need to pull in rf_archs.h
- for *.c, don't rely on rf_types.h to pull in rf_archs.h
2001-09-26 02:52:57 +00:00
oster e475673b85 Nuke an unused typedef. 2001-09-25 02:56:13 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
thorpej 1cbbd5c37c Disable all of the RF_ASSERT()s by default, enabling them if the
RAID_DIAGNOSTIC option is specified in the kernel configuration
file.
2001-09-01 23:50:43 +00:00
oster 99020323e6 Nuke the 5 NULL parameters from rf_DoAccess(). Observe that 4 of
the variables are passed directly to rf_AllocRaidAccDesc(), and the 5th
isn't even used.  Hunt them down and nuke them too.
2001-07-27 03:30:07 +00:00
thorpej 228b23427f bcmp -> memcmp 2001-07-18 06:46:46 +00:00
thorpej cf56c44a86 bzero -> memset 2001-07-18 06:45:33 +00:00
oster 81f5c58b58 If we're closing the last partition on a RAID set and the system is
being shutdown, then unconfigure the RAID set too.  This fixes a number
of issues with doing proper unconfigures/shutdowns of multi-level RAID
sets.

Thanks to Jason Thorpe and Bill Squier for the ideas/suggestions on
how/where to do this, and to Bill Squier for testing.
2001-07-16 15:50:27 +00:00
oster bdfad3793f We don't need to check for raidautoconfig here, so nuke it and
clean up a little.
2001-06-21 03:07:04 +00:00
oster 76d322c58c #if out a few more bits that arn't required if we are not doing
PQ or RAID6.
2001-06-20 03:09:23 +00:00
oster 0e8f8213af A bunch of these bits are only needed for the EVENODD stuff.
Shaves a little better than 1K off the size of an i386 kernel.
2001-06-19 03:25:16 +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
mrg 054673b07c #endif /* takes no argument */ 2001-06-08 12:51:17 +00:00
oster 856e0a920e A value of 1 for tracks/cylinder in the disklabel is apparently sub-optimal.
Thus we choose "4 * number_of_columns" as a more reasonable
value (until someone comes up with something better).
This pretends to properly address PR#11989.
2001-04-05 02:48:51 +00:00
mrg 8e0434ce99 include <sys/param.h> before <sys/ioctl.h> 2001-02-03 12:51:10 +00:00
oster cc2a28f2c0 Un-'__P'ify. 2001-01-27 20:42:20 +00:00
oster 1949425ffc Nuke some bogus debug code that was already '#if 0'ed out. 2001-01-27 20:18:55 +00:00
oster e6d8ca0dee Cosmetic cleanup of some comments, and nuke an unused #define. 2001-01-27 20:10:49 +00:00
oster 75ea8b428e Having moved some of the bits needed by raidctl into rf_configure.c, we
no longer need those bits here.  In particular, this file is now only
used in the kernel, and that allows us to clean up a lot of cruft.
2001-01-27 19:34:43 +00:00
oster 3edd34f0be More #if's. This needs some serious rototillage, but a few #if's will
suffice for now.
2001-01-27 02:13:34 +00:00
oster c4a426333f My.. what a twisty little maze of #defines and dependencies. Some of this
code is used for more than anticipated, and I missed a few checks last
night.  Thanks to Bernd Ernesti for poking me about this.
2001-01-26 14:06:16 +00:00
oster e47b177bc0 Nobody calls these bits if we arn't doing RAID5 with rotated spare stuff.
Add an #if.
2001-01-26 05:16:58 +00:00
oster 1763f954c7 These bits are only needed for the interdecluster stuff.. wrap them
with an #if.
2001-01-26 05:09:13 +00:00
oster 7833c33e99 Whoops.. Leave them on.. (for now.) 2001-01-26 04:43:16 +00:00
oster a40eef11ac Give the parity declustering code their own 'RAID arch' types, and
allow us to turn them off if desired.
2001-01-26 04:40:03 +00:00
oster 61a2ee28fb Lots of stuff here that is only used for some of the 'fancier' RAID types.
Don't compile it if we arn't going to use it.
2001-01-26 04:27:16 +00:00
oster bcc70a3f37 Clean up some INDENT warnings. (yes, these have been there for a while!) 2001-01-26 04:14:14 +00:00
oster 0a5ca1547d Various parts of this file are only needed by the even/odd and PQ
RAID types.  Don't include those bits if we arn't doing even/odd or PQ stuff.
2001-01-26 04:05:08 +00:00
oster 9880e186ec Don't build the stuff in this file if RF_INCLUDE_EVENODD is not defined. 2001-01-26 03:50:53 +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
fvdl d040bd5908 Return error in the case of using ODIOCGDINFO or ODIOCGDEFLABEL when
the number of partitions is > OLDMAXPARTITIONS. This is better
than silently truncating the label (don't want to silently throw
away partitions when using an old disklabel binary on a label with
> 8 partitions). From Enami Tsugutomo.
2001-01-08 02:03:45 +00:00
fvdl e2d1c1f926 Adapt all disk devices in MI directories to handle ODIOC* calls
for ports that have bumped MAXPARTITIONS (and thus define
__HAVE_OLD_DISKLABEL).
2001-01-07 18:09:01 +00:00
oster b36a1a085e For the RF_ASSERT() and RF_PANIC() macros, call a function to do the
sprintf, instead of doing the sprintf in the macros.  This means just
1 copy of each of the error messages, chopping about about 16K off the
size of an i386 kernel.  Thanks to Simon Burge and Enami Tsugutomo
for providing the inspiration to do this.
2000-12-15 02:12:58 +00:00
oster 7a8eea351b Fix a couple of warnings about uninitialized variables. Thanks go to
Frank van der Linden for pointing these out.
2000-12-05 01:35:56 +00:00
fvdl b6d9ce390e Comment out 2 cases of unitialized variable use (only used when
debugging is switched on, though).
2000-12-04 11:35:46 +00:00
chs c62d17a551 rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
2000-11-20 08:24:08 +00:00
oster d349cdf1ef Move disk_busy() and disk_unbusy() to more sane locations. Values
reported by 'systat iostat' and friends are now much more correct for
RAIDframe devices.  Thanks to Andrew Doran for poking me about this,
and for suggestions on and review of the changes.
2000-10-20 02:24:45 +00:00
oster f9a49b32bf Don't touch a failed component at all. Thanks to Robert Elz (kre) for
noting the problem and providing additional comments.
2000-10-17 03:39:41 +00:00
oster fc40c38df6 Minor fixup for a printf(). Noted by Robert Elz. 2000-10-12 03:28:49 +00:00
oster 3ee0550572 convert tsleep()->ltsleep(), which makes the kernel complain less
when compiled with LOCKDEBUG.
2000-09-21 01:45:46 +00:00
oster 014e17fbdc Correct a few calls to VOP_CLOSE(). 2000-09-21 01:37:35 +00:00
oster 32802fc83f Be consistent: use mcpair->cond instead of mcpair->flag.
This also lets us clean up a bunch of cruft.
2000-09-11 02:23:14 +00:00
oster e8645831a5 Only reset the timer value if it actually accumlated time.
Otherwise it may never accumulate any time, and the recon delay
will never happen.
2000-09-11 00:22:45 +00:00
oster 3fa62c4642 Make sure we are passing a locked vp to VOP_CLOSE. 2000-09-08 01:36:35 +00:00
thorpej a6b7f5a17d Use RF_WAIT_COND() to avoid locking errors. 2000-08-20 16:51:03 +00:00
thorpej d06cb9ab29 RF_COND_WAIT(): use ltsleep().
RF_SIGNAL_COND(): use wakeup_one().
2000-08-20 16:15:31 +00:00
oster 49742b54fa Remove a bogus VOP_UNLOCK. 2000-08-19 18:20:07 +00:00
oster 3a17c9470d Don't try to initialize a component label on a failed component. 2000-08-19 18:07:36 +00:00
oster dc4b749234 Fix the status reporting for copybacks. Thanks to Hubert Feyrer for
reporting the problem.
2000-07-14 15:26:29 +00:00
oster ce2b2827e5 Nuke a printf that *I* added at least as early as Nov, 1998, and which is
as bogus now as it was then.
2000-06-29 00:22:27 +00:00
oster 7a0d138818 Nuke a (mostly) now-incorrect comment. 2000-06-11 03:35:38 +00:00
oster 6dcc553fae Remove outdated comment. 2000-06-04 02:16:05 +00:00
oster 0b63accce0 Merge rf_update_component_labels() and rf_final_update_component_labels(). 2000-06-04 02:05:13 +00:00
oster 1dcc041500 Minor prototype cleanup. 2000-06-04 01:39:49 +00:00
oster 2c127bf249 Allow getting a component label from a spare disk. 2000-06-03 16:44:43 +00:00
oster 66e6338ac9 Use 'componentN' rather than leaving blanks for non-existant disks
in the 'raidctl -s' output.
2000-06-02 01:17:14 +00:00
matt c9aff328d9 Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
2000-06-01 00:49:49 +00:00
oster 00a6796b71 Oops.. reconstruction percentages were being reported incorrectly.
Thanks to Manuel Bouyer for noting this.
2000-05-31 00:52:36 +00:00
oster 8e82dfa363 For a RAID 1 set that has N components, allow the set to auto-configure as
long as at least one of the master or the mirror is available for each
of the N/2 'rows' of the set. (No, RAIDframe doesn't do N-way mirroring..)
Thanks to Manuel Bouyer for noting the problem.
2000-05-30 03:29:49 +00:00
oster ef4a0a7cf8 Use #include <sys/kernel.h> instead of a 'extern int hz'.
Make this file more readable.
2000-05-30 02:04:29 +00:00
oster c11100526b Don't let the autodetection code get tripped up by negative mod-counters. 2000-05-29 02:57:34 +00:00
oster f1f5c4d00e Fix a couple of typos. (Thanks Wiz! :) ) 2000-05-29 01:43:04 +00:00
oster 39a667120f In the event that an up-to-date component cannot be located for a specific
position, see if there is a failed component still hanging around that
we can use instead (but still mark it as failed).  This leads to more
reasonable behaviour (and fewer surprises!) when autoconfiguring and
failed (or previously failed) components are still on the system.
2000-05-28 22:53:49 +00:00
oster f329fb84ad We need to be slightly more clever during auto-configuration, to make
sure that we a) don't ignore components with correct mod-counters, and
b) do ignore components with bogus mod-counters.
2000-05-28 05:23:41 +00:00
oster 1ddfaaf8fa Umm.. Complete is not equal to 'left to do'. Fix the math. 2000-05-28 03:42:23 +00:00
oster e38b4355e2 Abort any parity re-writes before unconfiguring a RAID set.
Partially addresses PR#10182.
2000-05-28 03:00:31 +00:00
oster 228570e110 When setting auto-config/rootable bits, only try to update the
component label if the component is actually alive.
2000-05-28 01:03:22 +00:00
oster 1aaf6772f1 - Add a mechanism for obtaining finer-grained 'progress' information
regarding reconstructs, copybacks, etc.

- RAID 0 doesn't do copybacks, but don't make raidctl sweat about it.
2000-05-28 00:48:30 +00:00
oster 26b4598736 Components which match on everything but the mod_counter are
renegades, and must be handled correctly.  In particular, they should
be added to their old auto-config set, but then immediately released.
Failing to do otherwise means that they potentialy end up in a
different (and competing!) RAID set which may auto-configure in place
of the correct one, and cause all sorts of chaos at auto-configure
time.
2000-05-27 20:29:14 +00:00
oster e9b5b7aa5e Add a comment to clarify why we actually want the component label to
be considered a 'match' even if the mod_counter is wrong.
2000-05-27 19:12:03 +00:00
oster d2b2ed0970 Checking parity re-write status makes no sense on RAID 0, but let's
return something reasonable anyway.
2000-05-27 18:23:27 +00:00
thorpej b8322d5c23 Const poison the layout name. 2000-05-23 00:44:38 +00:00
thorpej 071aed40ac A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well.  This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
2000-05-19 18:54:22 +00:00
minoura c2e8f67477 Add some missing casts of ioctl arg.
Obviously autoconfiguration wouldn't work on big-endian machines.
2000-05-19 04:53:25 +00:00
oster db11351ced Make sure the config structure allocated during autoconfiguration actually
gets initialized properly.  Should fix PR#9816.
2000-04-27 00:57:48 +00:00
oster 5845348e54 Revert last change (the last change was not necessarily desirable, and
had some other minor side-affects that were troublesome).
2000-04-17 19:35:12 +00:00
oster c71398f7a9 Don't allow configuration where the specified SectPerSU may result in IO larger
than MAXPHYS being sent to underlying devices.  Addresses PR#9868.
Will change if/when MAXPHYS goes bye-bye.
2000-04-16 03:24:26 +00:00
oster cf0b47bd0e Minor cleanup of unneeded verbosity. 2000-03-31 02:05:24 +00:00
oster cd61979606 Print out the 'root' status of a RAID set during autoconfiguration. 2000-03-31 01:20:43 +00:00
oster 8d702c4b54 Nuke 'register' from some function prototypes. 2000-03-30 13:39:07 +00:00
augustss 169ac5b3c1 Remove register declarations. 2000-03-30 12:41:09 +00:00
oster d0c76be757 cleanup function prototypes. 2000-03-27 03:25:17 +00:00
oster b97e06092d Shuffle some prototypes to a more appropriate location. 2000-03-27 03:01:33 +00:00
oster 2ee63332b3 Add bits for eventual support of deleteing components and moving
hot-spares into the main set.
2000-03-26 22:38:28 +00:00
oster d9da26f998 Nuke a function prototype that shouldn't be here. 2000-03-25 16:24:57 +00:00
oster e44151e8d6 Fix up some autoconfigure messages. In particular, don't try printing
the value of an uninitialized variable.  Noted by Luke Mewburn.
2000-03-22 01:41:41 +00:00
oster 7f288b4e0d Just return "100% done" when asked about reconstruction progress on
a RAID0 set.
2000-03-20 22:59:26 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
oster 7c57ac56d7 Cleanup a couple of function declarations. No functional changes. 2000-03-07 03:09:47 +00:00
oster 51ffb0924c Create a new rf_close_component() to handle vnode operations for closing
components.  Teach rf_UnconfigureVnodes() how to use it, and tell
the copyback and reconstruction code about it too.
2000-03-07 02:59:50 +00:00
oster ddebc1cad0 Move rf_UnconfigureVnodes to rf_netbsdkintf.c where it will be more at home.
Add prototype to rf_kintf.h, and nuke old prototypes from rf_disks.c and
rf_driver.c .
2000-03-07 02:28:05 +00:00
oster 33a55d022b rf_ protect the component label print routine, and make it more easily
available to the rest of RAIDframe.
2000-03-07 02:12:13 +00:00
oster dbf5d1f7a6 Nuke unused code. 2000-03-07 01:54:29 +00:00
oster 1231bd6d14 Umm... don't allow attempts to configure the same RAID device multiple times.
The check was there, but the return() was missing :(
2000-03-04 06:03:21 +00:00
oster 0049933f0f Reorganize some comments. 2000-03-04 04:22:34 +00:00
oster 194aba4e41 Garbage collect the (already disabled) "random" queue type. 2000-03-04 03:27:13 +00:00
oster 612e2e8f92 Nuke an unneeded #define. 2000-03-04 03:22:17 +00:00
oster 88a8d06a0b Use the common disk allocation code, rather doing things the old way. 2000-03-03 03:47:17 +00:00
oster 142175b1a1 Minor formatting cleanup. 2000-03-03 03:10:03 +00:00
oster 7b1139520e More minor cleanup. 2000-03-03 02:04:48 +00:00
oster 87f46374bb Minor cleanup. No functional changes. 2000-03-03 01:46:36 +00:00
oster 8cde772948 Oops.. Need to note the parity status when we unconfigure.
Noted by Aaron J. Grier. (Thanks!)
2000-02-29 16:54:29 +00:00
oster 8c46e74418 Nuke some debugging output that got left in by mistake. 2000-02-27 02:35:33 +00:00
oster 82419f5ae9 Only mark the components as CLEAN if it's the last thing we're doing.
Marking them CLEAN earlier is (currently) asking for trouble.
(XXX This could have been done more elegantly.)
2000-02-27 01:50:22 +00:00
oster d9c47013b2 Defopt 'RAID_AUTOCONFIG'. Adding 'options RAID_AUTOCONFIG' turns on
the component auto-detection and auto-configuration of RAID sets.
Also, add "#options RAID_AUTOCONFIG" to the GENERIC config files.
2000-02-26 17:35:33 +00:00
oster caa3932441 Minor cleanups. Remove extra debugging printouts. 2000-02-25 20:11:00 +00:00
oster 21243f6205 - ignore the mod_counter when checking to see if a component fits with the
rest of an autoconfig set.
- minor cleanups
2000-02-25 19:56:56 +00:00
oster 503220a18f - ignore components whose mod_counter values are too low.
- noting the mod_counter for autoconfigured sets would be a win too.
2000-02-25 19:56:32 +00:00
oster 8d63540a8c When we close autoconfigured components, we need to note that they
are no longer in 'autoconfigured' status.
2000-02-25 17:14:18 +00:00
oster a4f7f062fd - cleanup raidinit()
- cleanup rf_mountroot_hooks()
- various other cleanups.
2000-02-25 02:42:30 +00:00
oster 5716b5d6d1 Be *slightly* more consistent about the use of num and numraid in raidattach(). 2000-02-25 02:21:12 +00:00
oster e4e4483cb7 Fix a (slightly) bogus status message. 2000-02-25 02:06:34 +00:00
oster bdd659fc7f Deal with unconfiguring components in the autoconfigure case. 2000-02-24 23:39:21 +00:00
oster aea97a5a17 Oops... Missed commmitting this last night. Thanks to Matthias Scheler
for letting me know.
(Add the DiskQueueSW pointer)
2000-02-24 17:12:10 +00:00
oster e644abfe94 Make sure we close auto-configured components appropriately when
attempting a rebuild-in-place.
2000-02-24 04:39:41 +00:00
oster c5961cfba3 Garbage collect some unused stuff. Include rf_kintf.h for a
function prototype.
2000-02-24 03:52:15 +00:00
oster 851a2cdcd8 - record the pointer to the DiskQueueSW so we can use that when
we hot-add a spare.
- use the above info when adding a spare.
2000-02-24 03:48:41 +00:00
oster 9e81bc058e Now that we have the information available, use the general maxOutstanding
value for the RAID set, rather than looking at Queue[0][0] (which may not
exist).
2000-02-24 02:55:05 +00:00
oster 99f070bab8 - mod_counter needs to get incremented more often.
- use raid_init_component_labels instead of hand-rolling a component_label.
(missed doing this for the rf_used_spare case when updating component labels).
- fix serial number initialization in raid_init_component_labels
2000-02-24 01:23:05 +00:00
oster fb13ce76fc - make sure we note the parity status in the autoconfig case.
- also, make sure we grab the serial number from the component labels
when we autoconfig.
2000-02-24 01:22:32 +00:00
oster d91ecfbcfd Be more aggressive about updating component labels in the event
of a real component failure (or a simulated failure):
- add 'numNewFailures' to keep track of the number of disk failures
since mod_counter was last updated for each component label.
- make sure we call rf_update_component_labels() upon any component failure,
real or simulated.
2000-02-23 03:44:02 +00:00
oster e7f3dc2ec9 blockSize for the component label is already set correctly here. 2000-02-23 02:11:05 +00:00
oster 0c43bf18f0 - cleanup of more component label code
- make current default label values available everywhere
- make sure numBlocks and blockSize in component labels get initialized
for all component labels
- check for component size to be smaller than or equal to the partition size
when autoconfiguring
2000-02-23 02:04:21 +00:00