have been there in the first place. A GENERIC kernel shrinks almost 1k.
Add a slightly different safetybelt under nostop for tty drivers.
Add some missing FreeBSD tags
a quick think and discussion among various people some form of some of
these changes will probably be recommitted.
The reversion requested was requested by dg while discussions proceed.
PHK has indicated that he can live with this, and it has been agreed
that some form of some of these changes may return shortly after further
discussion.
the highly non-recommended option ALLOW_BDEV_ACCESS is used.
(bdev access is evil because you don't get write errors reported.)
Kill si_bsize_best before it kills Matt :-)
Use the specfs routines rather having cloned copies in devfs.
some swapper problems analogous to those experienced with ccd.
This fix is a kludge: since we currently don't track the "sector size"
in a volume label, we guess a worst case (4 kB, as used by vnode
devices). If the concept of sector size is here to stay, I'll make
some changes to track the "sector size" of a volume. This will
probably be the maximum of the sector sizes of all component drives,
but things could get ugly if we start allowing non-standard sector
sizes such as 524 bytes.
Unkludged-version-submitted-by: phk
initialize subdisks. Probably the plex-related subdisk type will die
a death.
vinumconfig.c:
Accept (and ignore) kernel state information in userland config
files. This saves a lot of error recovery and also makes it possible
to use the output of printconfig to create new configuration.
Remove checkdiskconfig(). It wasn't needed any more.
Start adding support for hot spare drives. You can't put anything on
them (yet).
Change message formats from %lld to %qd.
get_empty_sd: Initialize size to -1. Previously this was done in
config_subdisk, which is the wrong place.
start_config: set current drive, plex and volume to -1, thus stopping
update configurations from taking their defaults from old configs.
the device numbers are now minor number only, so that we can still
compare them after dev_t has turned into a blob.
Broken-by: dev_t changes
Reported-by: Vallo Kallaste <vallo@matti.ee>
"Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
fix; it doesn't address the problem of removing the module. If you do
the following:
vinum stop
fsck /dev/vinum/VOLUME
you *will* get a system crash. What we need is a cdevsw_remove
corresponding to cdevsw_add, but that hasn't been written yet.
Submitted-by: phk
Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline)
function.
Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
to the order of the cmaj/bmaj arguments!)
Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
(ditto!)
(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
1:
s/suser/suser_xxx/
2:
Add new function: suser(struct proc *), prototyped in <sys/proc.h>.
3:
s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/
The remaining suser_xxx() calls will be scrutinized and dealt with
later.
There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.
More changes to the suser() API will come along with the "jail" code.
Repeatedly-tripped-over-by: Vallo Kallaste <vallo@matti.ee>
When VINUMDEBUG is set, free any memory found still
allocated.
Only log errors if DEBUG_EXITFREE is set.
free_vinum: Wait for daemon to stop by checking the
vinum_conf.flags & VF_DAEMONOPEN.
vinum_modevent:
When compiled with VINUMDEBUG, check if we have
forgotten to free any memory, and log an error if we
have.
vinumopen: Allow open of an empty subdisk (otherwise we can't
initialize it).
plexes_used and volumes_used. Now these fields are only informative,
and the <object>_allocated count is used for searches, etc. This also
required checking the object state before doing things with the
presumed object.
Problems-reported-by: Kiril Mitev <kiril@ideaglobal.com>
This solved a problem where 'vinum resetconfig' only reset half
the drives.
Reported-by: Brad Knowles <blk@skynet.be>
Karl Pielorz <kpielorz@tdx.co.uk>
Change the super device. We now have three super devices:
1. The normal superdevice used by vinum(8).
2. The superdevice used by vinum(8) when compiled with debug support.
3. The superdevice used by the daemon.
This method allows vinum(8) to determine debug mismatches. Also check
correctly for the device type. The old code did not check all bits of
the minor number.
Reported-by: a cast of thousands, most recently by Brad Knowles
<blk@skynet.be>.
vinumattach: Zero out tables after allocating them
Modify procedure at unload: if a vinum(8) has the superdev open, don't
close down. If only the daemon has it open, send the daemon a stop
request and wait for it to close the superdev, then unload.
In order to do this, create a second superdev which is opened by the
daemon. The open and close routines set a different bit in
vinum_conf.flags; otherwise the treatment is identical.
Remove opencount field in vol structure; replace by a flag bit, since
we can't count the number of opens.
Remove dead LKM grunge.
apparently in accordance with style(9).
Complained-about-by: bde
vinumopen: Change check for root user to a call to suser(9)
vinumclose: Remove check for root user.
Nitpicked-by: phk
Change from lkm to kld
Remove BROKEN_GDB kludge (it's not needed with klds)
Add code for interfacing with daemon
Modify manner of determining when module is idle
Modify device minor number encoding, use selector functions which also
permit anonymous plexes and subdisks.
Remove code for 2.x support.
Move vinum_scandisk to vinumio.c
Remove myproc kludge
Keep track of open volumes by flag, not by pid (the pids caused some
problems with the lock manager).
free_vinum:
Remove unmapped and defective regions from plexes.
Wait for daemon to stop before returning
vinumopen:
Don't refuse an open if the volume is already open.
kernel as a pseudo-device. The changes were:
- #ifdef DEBUG -> #ifdef VINUMDEBUG
- opt_vinum.h for holding above config variable
- Fixing up a few stray problems where DEBUG wasn't optional.
- config.c -> vinumconfig.c (there's already a config.o)
- Other *.c -> vinum*.c (wasn't strictly necessary, but done in case we end
up with something else conflicting later on and we might have to have yet
more repository copies of files).
- include file paths fixups.. (ie: get them all from the kernel tree
instead of partly from the kernel and partly from /usr/include/machine)
I've spoken with Greg about this.. I hope this doesn't mess him around
too much..