Commit Graph

142 Commits

Author SHA1 Message Date
phk
3cc313c2e5 Fix a {} bug which doesn't have any effect yet.
Spotted by:	jake
2002-04-27 07:07:37 +00:00
phk
3a1c16f2bc Improve the cross-references in the XML output.
Explained by:	des
Sponsored by:	DARPA & NAI Labs.
2002-04-24 21:02:28 +00:00
phk
5ec8e881ee Make specific provisions for the kernel simulator used in the regression
tests, other userland programs may need to include <geom/geom.h>.

Sponsored by:	DARPA & NAI Labs.
2002-04-24 12:53:12 +00:00
phk
4ca7562a61 Implement the GEOMGETCONF ioctl which returns vital stats for the
current device in XML in an sbuf.

Sponsored by:	DARPA & NAI Labs
2002-04-23 19:54:02 +00:00
phk
07bfe3bc16 All in a days work: make a function static. 2002-04-23 19:03:03 +00:00
phk
90094c67a1 Introduce some serious paranoia to try to catch a memory overwrite problem
as early as possible.

Sponsored by:	DARPA & NAI Labs
2002-04-23 11:48:45 +00:00
phk
ab6dc20b52 Protect against multitple #includes of this file. 2002-04-22 19:54:17 +00:00
phk
4509f96cc5 Make kernel dumps work with GEOM.
Notice that if the device on which the dump is set is destroyed for
any reason, the dump setting is lost.  This in particular will
happen in the case of spoilage.  For instance if you set dump on
ad0s1b and open ad0 for writing, ad0s* will be spoilt and the dump
setting lost.  See geom(4) for more about spoiling.

Sponsored by: DARPA & NAI Labs.
2002-04-19 09:24:12 +00:00
phk
a274092cf6 Make life easier for reference-vector generatorts in tools/regression/geom
by including a FreeBSD friendly CVS identifier in the XML output.

Sponsored by: DARPA & NAI Labs.
2002-04-19 09:21:27 +00:00
phk
a90e28ebbb Implement DIOCGFRONTSTUFF ioctl which reports how many bytes from the start
of the device magic stuff might occupy.

Sponsored by: DARPA & NAI Labs.
2002-04-09 15:43:32 +00:00
phk
c2f17d16c7 Various stylistic nit picking.
Sponsored by: DARPA & NAI Labs.
2002-04-09 15:17:59 +00:00
phk
7071088894 Introduce the convenience function g_getattr() and make it DWIM.
Sponsored by: DARPA & NAI Labs.
2002-04-09 15:13:42 +00:00
phk
6ec0e5c95f Constifixation of attribute argument to g_io_[gs]etattr()
Sponsored by:	DARPA & NAI Labs
2002-04-09 15:12:05 +00:00
phk
33405073ec 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
phk
28a8eb54ff In reverence of the 3rd X11 development rule:
3.The only thing worse than generalizing from one example
	is generalizing from no examples at all.

Remove the fwcylinders attribute before anybody gets the idea that we
alone have squared the circle.

Sponsored by:	DARPA & NAI Labs.
2002-04-08 08:00:40 +00:00
jhb
db9aa81e23 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
phk
db493db577 Centralize EOF handling and improve access controls for bio scheduling.
Sponsored by:	DARPA & NAI Labs
2002-04-04 09:58:20 +00:00
phk
fd177bc959 Move access and orphan member functions from class to geom.
Sponsored by: DARPA & NAI Labs
2002-04-04 09:54:13 +00:00
phk
46a753d1ac s/classs/classes/ to fixup grammer after the previous global renaming.
Sponsored by: DARPA & NAI Labs
2002-04-04 09:41:47 +00:00
phk
4d586060a3 Retire the bogus ioctl DIOCGPART in toto.
Once again we can notice that badly thought out hacks ferment and infect
far more code than initially expected.

Sponsored by:	DARPA and NAI Labs.
2002-04-02 11:52:13 +00:00
phk
bcba0677fb One less user of the bogus DIOCGPART ioctl. 2002-04-02 11:17:37 +00:00
phk
fcdd7b2328 Initialize a field to cater for ata-raid 2002-04-02 10:09:16 +00:00
phk
ef82a51634 Here follows the new kernel dumping infrastructure.
Caveats:

The new savecore program is not complete in the sense that it emulates
enough of the old savecores features to do the job, but implements none
of the options yet.

I would appreciate if a userland hacker could help me out getting savecore
to do what we want it to do from a users point of view, compression,
email-notification, space reservation etc etc.  (send me email if
you are interested).

Currently, savecore will scan all devices marked as "swap" or "dump" in
/etc/fstab _or_ any devices specified on the command-line.

All architectures but i386 lack an implementation of dumpsys(), but
looking at the i386 version it should be trivial for anybody familiar
with the platform(s) to provide this function.

Documentation is quite sparse at this time, more to come.

Details:

ATA and SCSI drivers should work as the dump formatting code has been
removed.  The IDA, TWE and AAC have not yet been converted.

Dumpon now opens the device and uses ioctl(DIOCGKERNELDUMP) to set
the device as dumpdev.  To implement the "off" argument, /dev/null
is used as the device.

Savecore will fail if handed any options since they are not (yet)
implemented.  All devices marked "dump" or "swap" in /etc/fstab
will be scanned and dumps found will be saved to diskfiles
named from the MD5 hash of the header record.  The header record
is dumped in readable format in the .info file.  The kernel
is not saved.  Only complete dumps will be saved.

All maintainer rights for this code are disclaimed: feel free to
improve and extend.

Sponsored by:   DARPA, NAI Labs
2002-03-31 22:37:00 +00:00
phk
b6715b27c1 Remove bogus ccddump() function in favour of the standard nodump. 2002-03-29 21:12:11 +00:00
phk
6eba0c6062 Complete an incomplete cut&paste operation. 2002-03-28 22:00:24 +00:00
phk
ccd365e75e Add preliminary PC98 class to GEOM.
I have not been able to find very much information about the PC98
extended partition layout so this is gleaned from the source in
our pc98 architecture.  Corrections and patched very welcome.

Sponsored by: DARPA and NAI Labs.
2002-03-28 21:38:38 +00:00
phk
e11a1be17e In the absense of any smarter way to do this, cast various printf
arguments to silence printf format warnings.
2002-03-28 10:09:24 +00:00
phk
d3fb224518 Calculate the checksum the right place for alpha. The fact that this
worked for the beast disklabel only goes to show how weak a simple
parity really is.
2002-03-27 21:16:49 +00:00
phk
aeded84143 Eliminate some thread pointers which do not make sense anymore.
Split private parts of geom.h into geom_int.h.  The latter should
never be included in class implemtations.
2002-03-26 22:07:38 +00:00
phk
1af8cfb2f2 Cave in to tradition and rename "methods" to "classes". 2002-03-26 21:40:06 +00:00
phk
3d1eaf5230 Push BIO_FORMAT into a local hack inside the floppy drivers where
it belongs.
2002-03-26 19:16:37 +00:00
phk
7f990ca62c Make the BSD method width/endian agnostic and support alpha
architecture labels as well.

Sponsored by: DARPA, NAI Labs.
2002-03-24 14:27:31 +00:00
phk
4068fec653 Be more systematic about conversion of on-disk formats in a endian/width
agnostic way.

Collapse the MBR and MBREXT methods into one file and make them endian/width
agnostic.

Sponsored by:	DARPA & NAI Labs.
2002-03-24 11:21:41 +00:00
alfred
3f502bc0e3 Fix bio->bio_blkno format warning. 2002-03-19 20:12:08 +00:00
phk
4106fb6349 Add five GEOM oriented ioctls to get basic information about a geom device. 2002-03-19 13:54:15 +00:00
phk
4a2ff1a0f0 Need a different #include for the userland regression test. 2002-03-17 19:15:28 +00:00
phk
963527831a Make this compile in the userland-regression testsuite again. 2002-03-17 18:57:49 +00:00
phk
b0ade0b35f Change the giant-dropping method a fair bit to keep WITNESS more
happy.
2002-03-17 07:42:54 +00:00
phk
093fe76cad Forgot to remove the old g_malloc() call when I split it.
Spotted by:	dima
2002-03-17 07:00:39 +00:00
phk
c262dd55af Hmm, talk about optimizer-fodder. Make the DIOCGDVIRGIN hack work again. 2002-03-16 13:47:57 +00:00
phk
688687434f Add a generic and general ioctl pass-through mechanism.
It should now be posible to issue ioctls to SCSI CD drives.
2002-03-16 09:24:19 +00:00
phk
62070488e8 Teach GEOM about Sun disklabel formats.
The detection code in this method is written so that it should work on
all architectures which means that you can plug a Sun disk into a i386
now and access the partitions.

We still need an endian-agnostic ufs/ffs before this is really
interresting, but the main focus was to get sparc64 onto the GEOM
trail.
2002-03-15 21:44:08 +00:00
phk
a920edd5b3 Try to get used to architectures which are picky about alignment. 2002-03-15 21:41:41 +00:00
mckusick
e929f2e4f0 Introduce the new 64-bit size disk block, daddr64_t. Change
the bio and buffer structures to have daddr64_t bio_pblkno,
b_blkno, and b_lblkno fields which allows access to disks
larger than a Terabyte in size. This change also requires
that the VOP_BMAP vnode operation accept and return daddr64_t
blocks. This delta should not affect system operation in
any way. It merely sets up the necessary interfaces to allow
the development of disk drivers that work with these larger
disk block addresses. It also allows for the development of
UFS2 which will use 64-bit block addresses.
2002-03-15 18:49:47 +00:00
phk
3e53a43775 First commit of the GEOM subsystem to make it easier for people to
test and play with this.

This is not yet production quality and should be run only on dedicated
test boxes.

For people who want to develop transformations for GEOM there exist a
set of shims to run geom in userland (ask phk@freebsd.org).

Reports of all kinds to: phk@freebsd.org
Please include in report:
        dmesg
        sysctl debug.geomdot
        sysctl debug.geomconf

Known significant limitations:
        no kernel dump facility.
        ioctls severely restricted.

Sponsored by:   DARPA, NAI Labs
2002-03-11 21:42:35 +00:00
jhb
3706cd3509 Simple p_ucred -> td_ucred changes to start using the per-thread ucred
reference.
2002-02-27 18:32:23 +00:00
phk
50b47197be Reduce kernel stack usage of ccdinit() by MAXPATHLEN by using MALLOC(9).
Submitted by:	Maxim Konovalov <maxim@macomnet.ru>
MFC after:	1 week
2001-12-30 17:34:19 +00:00
iedowse
554e3508b5 Return EOPNOTSUPP for unknown module events.
PR:		kern/18473
Submitted by:	"Jeroen C. van Gelderen" <gelderen@systemics.com>
2001-11-17 00:46:08 +00:00
julian
5596676e6c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
kris
bd6f9cb9b6 Fix some signed/unsigned integer confusion, and add bounds checking of
arguments to some functions.

Obtained from:	NetBSD
Reviewed by:	peter
MFC after:	2 weeks
2001-09-10 11:28:07 +00:00