Commit Graph

30 Commits

Author SHA1 Message Date
Poul-Henning Kamp
f341ca9891 Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
Poul-Henning Kamp
936cc4614b Rename bio_linkage to the more obvious bio_parent.
Add bio_t0 timestamp, and include <sys/time.h> where needed
2003-02-07 21:09:51 +00:00
Joerg Wunsch
e1df235292 Finally make vinum ready for the root filesystem in FreeBSD 5.x. (A
similar patch has been in 4.x for a while, but is more hacky there.)

For this to work, vinum has to be loaded early (e. g. from
boot/loader), for obvious reasons.  If the kernel env variable
(aka. loader variable) "vinum.autostart" is set, vinum then asks the
sysctl kern.disks for all available disks in the system, and scans
them for possible vinum headers.

For statically compiled kernels, this behaviour can be obtained even
without boot/loader by using "options VINUM_AUTOSTART" (though this is
not the recommended way).

Alternatively, the 4.x way to specify "vinum.drives" is also supported.

No further hacks (like the 4.x "vinum.root" variable) are needed,
since in 5.x, mountroot() asks back at the drivers to have them
resolve the name of the root FS into a dev_t (using the dev_clone
eventhandler).

(The MFC reminder below is for a partial MFC for vinum.autostart, the
rest is already there in 4.x.)

Timed out on:	grog
MFC after:	2 weeks
2003-02-05 21:02:56 +00:00
Poul-Henning Kamp
77068a7fe2 Retire the bogus uses of the disklabel field d_sbsize and begin to
initialize it to zero so we don't have to have everbody and their
aunt including FFS specific header files.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:49:41 +00:00
Poul-Henning Kamp
2dd527b3ac Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.
Sponsored by:	DARPA & NAI Labs
2002-04-08 09:20:07 +00:00
Peter Wemm
953d6e00e9 Fix warnings:
vinumhdr.h:80: warning: redundant redeclaration of `vinum_cdevsw'
 vinumext.h:239: warning: previous declaration of `vinum_cdevsw'
in each of the following files:
 vinum.c, vinumconfig.c, vinumdaemon.c, vinuminterrupt.c, vinumio.c,
 vinumioctl.c, vinumlock.c, vinummemory.c, vinumraid5.c, vinumrequest.c,
 vinumrevive.c, vinumstate.c, vinumutil.c
2001-06-15 00:23:11 +00:00
Greg Lehey
74f5bf080b Remove Malloc definitions (now in vinumext.h) 2001-05-22 06:08:52 +00:00
Alfred Perlstein
d9ca06d2a3 Take a shot at making vinum devfs aware.
Adding make_dev() and destroy_dev() calls in (hopefully) the right
places.

This is done by calling make_dev() in each object constructor and
caching the dev_t's returned from make_dev() in each struct
'subdisk'(sd), 'plex' and 'volume' such that the 'object'_free()
functioncs can call destroy dev.

This change makes a subset of the old /dev/vinum appear under devfs.

Enough nodes appear such that I'm able to mount my striped volume.

There may be more work needed to get vinum configuration working
properly.
2001-02-20 11:37:04 +00:00
Jake Burkholder
a448b62ac9 Make intr_nesting_level per-process, rather than per-cpu. Setup
interrupt threads to run with it always >= 1, so that malloc can
detect M_WAITOK from "interrupt" context.  This is also necessary
in order to context switch from sched_ithd() directly.

Reviewed By:	peter
2001-01-21 19:25:07 +00:00
Greg Lehey
891b3d045f Reinstate 1.19.
Prodded by: iedowse
2001-01-10 21:42:06 +00:00
Greg Lehey
6694e200e5 Get definition of Malloc right when not using VINUMDEBUG
Pointed out by:	tegge
2001-01-10 05:05:46 +00:00
Jake Burkholder
ef73ae4b0c Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
2001-01-10 04:43:51 +00:00
Greg Lehey
e19bc84f20 Don't include system-specific header files for userland program.
Discovered by default by: alfred
2000-11-28 06:38:53 +00:00
Poul-Henning Kamp
9626b608de Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by:    peter
2000-05-05 09:59:14 +00:00
Peter Wemm
664a31e496 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 04:46:21 +00:00
Poul-Henning Kamp
7d5961670c Remove BAD144 support, it has already been disabled for some time. 1999-12-08 09:33:00 +00:00
Greg Lehey
eab69675bf Modify definition of Malloc: only M_WAITOK if we're not in an
interrupt context.
1999-10-13 03:16:56 +00:00
Nick Hibma
3e2c6ca3b9 Removal of sys/device.h
- Move intrhook stuff into kernel.h
- Remove all occurrences of #device <device.h>
- Add kernel.h were necessary (nowhere)
- delete device.h

This file contained the structures for cfdata (old style config) and is no
longer used. It was included by most drivers.

It confuses the remote debugger as the definition of 'struct device' in
device.h is found before the one in bus_private.h.
1999-10-05 21:19:41 +00:00
Julian Elischer
439a479b3b remove some out-of-scope DEVFS references..
(don't worry greg.. cosmetic only)
1999-09-03 05:08:05 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Greg Lehey
c4444aeb08 Include opt_vinum.h to get the VINUMDEBUG definition as early as
possible.  This fixed a problem building LINT.

Tripped-over-by: phk
1999-05-07 08:08:02 +00:00
Greg Lehey
560863926b Remove old grunge, including references to sys/disk.h (which is going
away).

Submitted-by:	phk
1999-05-07 01:35:29 +00:00
Greg Lehey
c73d47fca5 Define macro LOCKDRIVE for debugging drive locking deadlocks. 1999-04-10 08:09:49 +00:00
Greg Lehey
7f1050341c Change multiline comments to start with a lone /* and end with a */,
apparently in accordance with style(9).

Complained-about-by: bde
1999-01-29 01:17:54 +00:00
Greg Lehey
3a85d3f98a Remove old cruft 1999-01-21 00:33:47 +00:00
Peter Wemm
c285ca1254 Some relatively minor tweaks to enable vinum to be built into a static
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..
1998-12-28 16:28:24 +00:00
Peter Wemm
ef2dbe9885 If I've done this right, revive the vinum code in it's now home after it
was savaged in the blood bath a few hours ago.
1998-12-28 04:56:24 +00:00
Søren Schmidt
c74cd3590f Remove LKM's depricated by modules. 1998-12-27 19:38:15 +00:00
Peter Wemm
5ebfc07dce Remove machine/cputypes.h - it's an i386 only thing 1998-11-06 01:34:06 +00:00
Greg Lehey
e4381fa521 Import base vinum lkm sources 1998-09-16 05:56:21 +00:00