simonb
d0f1ac2965
Remove an assigned-to but unused variable.
2003-04-10 03:36:02 +00:00
thorpej
24a4b8faa6
Use PAGE_SIZE rather than NBPG.
2003-04-09 00:28:28 +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
thorpej
eb14e86676
Add a new BUF_INIT() macro which initializes b_dep and b_interlock, and
...
use it. This fixes a few places where either b_dep or b_interlock were
not properly initialized.
2003-02-25 20:35:31 +00:00
jdolecek
e3c5d7b092
constify some
2003-02-09 10:04:32 +00:00
pk
338f31f581
Make the buffer cache code MP-safe.
2003-02-05 21:38:38 +00:00
perry
1f4ad37fe3
"Utilize" has exactly the same meaning as "use," but it is more
...
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-05 00:02:24 +00:00
tron
f1eeaa9020
Only use MALLOC_DECLARE() in kernel namespace.
2003-02-01 18:34:14 +00:00
thorpej
b193480908
Add extensible malloc types, adapted from FreeBSD. This turns
...
malloc types into a structure, a pointer to which is passed around,
instead of an int constant. Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
simonb
276fd1665c
The Double-Semi-Colon Police.
2003-01-20 05:29:53 +00:00
thorpej
b97e4c2136
Merge the nathanw_sa branch.
2003-01-19 16:50:16 +00:00
junyoung
49f022f378
Fix typo. PR#19619.
2003-01-03 08:05:22 +00:00
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
oster
7370acda44
Nuke 'lockflag', a holdover from the simulation code. Thanks to Simon B.
2002-09-23 03:53:14 +00:00
oster
d1ef62f266
rf_lkmgr_mutex_destroy is currently unused. Thanks to Simon B.
2002-09-23 03:44:18 +00:00
oster
1c67e9d94b
Hide more stuff inside RF_DEBUG_SHUTDOWN. Add a prototype for
...
rf_FreeShutdownEnt() while we're here. Thanks to Simon B.
2002-09-23 03:42:50 +00:00
oster
e875ee2d89
Nuke "baddisk". Thanks to Simon B.
2002-09-23 03:40:28 +00:00
oster
3ac36660fa
Another 'unblockNode' goes *poof*. Also nuke an instance of an
...
(effectively) unused layoutPtr. Thanks to Simon B.
2002-09-23 03:38:51 +00:00
oster
9d518ec378
Clobber basically unused 'pda', and 'unblockNode' and 'wrUnBlock'.
...
Thanks to Simon B.
2002-09-23 03:36:08 +00:00
oster
a8c038ad35
struct proc *p was only assigned to. Thanks Simon B.
2002-09-23 03:31:51 +00:00
oster
f1529267b8
Make this build w/ DEBUG.
2002-09-23 03:28:41 +00:00
oster
4b1300c83f
The declaration for rf_GetSpareTableFromDaemon might be supplied in
...
a header file, but that doesn't help here if said header is not pulled in!
(Hi Simon :) )
2002-09-23 03:27:17 +00:00
itojun
393f467c67
make it compile with DIAGNOSTIC
2002-09-23 03:17:36 +00:00
simonb
daa3345504
Don't need declarations for rf_copyback_in_progress and
...
rf_GetSpareTableFromDaemon() - these are already supplied
in various header files.
2002-09-23 03:04:27 +00:00
oster
3e5db6c469
Ooops.. should have included this 'row' with the last change.
2002-09-23 02:55:03 +00:00
oster
d5e5932f5e
'row' was defined and set, but never used. *poof* Thanks to Simon B.
2002-09-23 02:53:58 +00:00
oster
b0da983806
Neither force nor retcode are used. *poof* Thanks to Simon B.
2002-09-23 02:51:43 +00:00
oster
d5e793770c
Remove unneeded variables and lame assignments. Thanks Simon B.!
2002-09-23 02:49:14 +00:00
oster
23b87a323a
bytesPerStripeUnit is set, but never used. Thanks to Simon B. for pointing
...
this out.
2002-09-23 02:40:07 +00:00
oster
35d3621d0c
dataBytesPerStripe is set, but never used. *poof*
2002-09-23 02:35:24 +00:00
oster
7264a7cc8c
RAIDGETBUF and RAIDPUTBUF were #defines that were only used in
...
one place. Simplify things by removing them, and clean up more
unneeded instances of 'unit' and 'rs'.
2002-09-22 03:56:08 +00:00
oster
fe654a583a
rf_flags wasn't being used. *poof*
2002-09-22 03:46:40 +00:00
oster
f99563a0ff
A little housecleaning to nuke stuff that was unused.
2002-09-22 03:44:42 +00:00
oster
86a6fcfe0a
Minor cleanup/reformatting.
2002-09-21 14:47:07 +00:00
oster
2a10c08e0a
#if 0 more stuff, per Krister's list. Thanks Krister!
...
(RAIDframe is now at a shade under 174K in GENERIC on i386)
2002-09-21 07:12:46 +00:00
oster
61da76cbbe
#if 0 out one other function, and shuffle DEBUG code. Actually
...
reclaims another 14K!?!?!! Thanks Krister!
2002-09-21 07:05:06 +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
0efe63f46b
rf_ReleaseBufferWaiter(s) were not being used! Thanks Krister!
2002-09-21 01:21:19 +00:00
oster
580f8b6e1e
rf_FreePhysDiskAddr is only needed by paritylogging.
...
rf_NumFailedDataUnitsInStripe is only needed by PQ, RAID6 and EVENODD.
rf_PrintAccessStripeMap is only needed for RF_DEBUG_MAP.
Thanks Krister!
2002-09-21 01:18:45 +00:00
oster
ce38eb4f8c
rf_FreeAccessStripeMapComponent() goes too. Thanks Krister!
2002-09-21 01:14:22 +00:00
oster
ce8b221a5e
Nuke rf_AllocAccessStripeMapComponent(). Thanks Krister!
2002-09-21 01:12:49 +00:00
oster
22f5e1b6bb
Garbage collect some old mountroothook stuff. Thanks Krister!
2002-09-21 01:09:43 +00:00
oster
265379416b
#if 0 an unused stub. Thanks Krister!
2002-09-21 01:08:38 +00:00
oster
24b54af7fb
Protect more stuff that's only used by the declustering code.
...
Thanks Krister!
2002-09-21 01:07:37 +00:00
oster
a16692eff6
rf_UnbootRaidframe isn't used. rf_print_assert_panic_message is
...
only needed if RAID_DIAGNOSTIC is defined. Thanks Krister!
2002-09-21 01:00:43 +00:00
oster
cbf5be6ee1
rf_MakePropListEntry isn't used anywhere, so nuke it. Thanks Krister!
2002-09-21 00:56:57 +00:00
oster
34fb146d27
Shuffle #ifdefs to include stuff only if we're doing parity logging
...
stuff. Thanks Krister!
2002-09-21 00:52:49 +00:00
oster
1b852f9959
Various "Fwd" versions of DAG creation functions arn't actually used anywhere!
...
Big thanks to Krister for noticing! (Saves another 10K on i386)
2002-09-21 00:50:10 +00:00
oster
5451819a68
rf_gcd, rf_free_2d_array, rf_make_1d_array, and rf_free_1d_array are
...
only used by the declustering bits. Thanks Krister!
2002-09-21 00:47:59 +00:00
oster
ec7171cd75
rf_CreateMirrorPartitionReadDAG is only used for chain declustering and
...
interdecluster. Thanks Krister!
2002-09-21 00:40:18 +00:00
oster
ea9e550f69
rf_CvscanConfigure() is a NOP. Nuke it. Thanks Krister!
2002-09-21 00:37:14 +00:00
oster
8a7eefa217
Another couple of functions that arn't used unless one is debugging RAIDframe.
2002-09-19 23:29:03 +00:00
oster
5faa29ac7d
Introduce RF_DEBUG_MAP, and use it to ignore more rarely used code.
2002-09-19 23:23:19 +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
c3bab92ad6
Nuke an obsolete comment.
2002-09-19 22:36:23 +00:00
oster
f6127d1018
Introduce and use RF_DEBUG_STATES to save a bit more kernel space.
2002-09-19 18:54:50 +00:00
oster
f1113b29c2
Nuke old (and now incorrect) comment.
2002-09-19 17:55:22 +00:00
oster
8fd475e54a
RF_DEBUG_ACCESS and RF_DEBUG_QUIESCE make things a little smaller.
2002-09-17 03:54:42 +00:00
oster
1b0ab96194
Introduce and use RF_DEBUG_QUEUE (for debugging the various queueing
...
types available in RAIDframe).
2002-09-17 03:43:34 +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
fe703e624d
Were these functions actually called by anything, I might have considered
...
keeping them...
2002-09-17 03:11:41 +00:00
oster
5dced80d48
Use RF_DEBUG_DISKQUEUE to eliminate more debuggin printfs that the
...
vast majority of the world will never see much less care about.
2002-09-17 02:55:12 +00:00
oster
e8ffb40a0e
Those of us who might be interested in debugging internal memory usage
...
of RAIDframe can use RF_DEBUG_MEM. I suspsect the rest of the world would
rather use that 14K of kernel memory for something else.
2002-09-16 23:40:57 +00:00
oster
763ac2f8fe
Assign a value to recon_buffer_size in a different way so that the
...
compiler doesn't complain when we change what RF_Free looks like.
2002-09-16 23:37:18 +00:00
oster
55b509f490
Cleanup some comments.
2002-09-16 02:48:34 +00:00
oster
969c6e9caf
'char *arrived' was such a nice variable. Too bad all we ever did
...
with it was malloc/free space for it. *poof*
2002-09-16 02:39:42 +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
8c2b691d7a
Release our hold on raidPtr if we're going to sleep.
2002-09-15 23:40:40 +00:00
oster
201928d9fa
Nuke unlockingOp -- it was only used for the userland version of the
...
code.
2002-09-15 21:34:03 +00:00
oster
7193ba8687
Remove a couple of unneeded structure members.
2002-09-15 21:31:11 +00:00
oster
207409a242
'buf2' is unused. Nuke it.
2002-09-15 21:19:50 +00:00
oster
be70d191af
General cleanup of a mess. No functional changes.
2002-09-15 21:04:35 +00:00
oster
b51d271e17
Nuke 'numPending' from the RF_RaidAccessDesc_s structure, and minor cleanup.
2002-09-15 19:25:07 +00:00
oster
7266276fb2
Add a local #define, and disable some debugging stuff.
2002-09-14 18:37:28 +00:00
oster
4499412f1a
Minor formatting cleanup, and nuke unused stuff.
2002-09-14 18:17:52 +00:00
oster
f41ac02382
rf_FlushAccessTraceBuf goes bye-bye.
2002-09-14 18:07:31 +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
954775e02c
Add two more debugging #defines: RF_DEBUG_RECONBUFFER and RF_DEBUG_VERIFYPARITY.
...
Use them to reduce kernel bloat by a little more.
2002-09-14 17:11:30 +00:00
oster
20185a3677
Amazingly enough, nothing is actually using the *_bxor3() functions.
...
#if 0 them.
2002-09-11 03:01:23 +00:00
oster
9dfe7eee91
Use the newly added RF_DEBUG_STRIPELOCK to effectively remove a bunch
...
of stuff that most of the world will never want to use.
2002-09-11 02:52:33 +00:00
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