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.
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.
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).
- 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.
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
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. :(
it gathers. Nuke it. Without update_size, FreeReconMapListElem() can
do without mapPtr. That, in turn, means crunch_list() doesn't need a
mapPtr either.
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