Commit Graph

38 Commits

Author SHA1 Message Date
phk
e059b79437 Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
imp
cf874b345d Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
phk
75f224dcec Don't divide by zero if there is no stripewidth specified. 2003-02-11 15:23:41 +00:00
phk
fd7ea6d48a Better names for struct disk elements: d_maxsize, d_stripeoffset
and d_stripesisze;

Introduce si_stripesize and si_stripeoffset in struct cdev so we
can make the visible to clustering code.

Add stripesize and stripeoffset to providers.

DTRT with stripesize and stripeoffset in various places in GEOM.
2003-02-11 14:57:34 +00:00
phk
18e25b25db Propagate G_PF_CANDELETE to our own providers from the provider we attach to. 2003-02-11 12:36:33 +00:00
alfred
bf8e8a6e8f Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
phk
51c494ca74 Add a check for negative offset locations and return EINVAL for them. 2002-12-17 21:31:58 +00:00
phk
3cf4280261 Get rid of g_slice_addslice() and use g_slice_config() instead.
Tested with:	i386 + src/tools/regression/geom
2002-12-16 23:08:48 +00:00
phk
cd9caf5281 Constification and some s/int/u_int/ changes. 2002-12-16 22:33:27 +00:00
phk
43d82ce26d Don't interpret the hotspots relative to all slices on a slicer, but
relative to the parent device.
2002-12-13 21:31:13 +00:00
phk
7b3238944a Add a simplified version of the hot-spot code to enable us to protect
in-band disklabels from in-band vandalism.

Approve by:	re
2002-12-02 19:59:25 +00:00
phk
8411a44a2f Remember to update the providers idea of its size when we reconfigure
a slice child.

Approved by:	re
2002-11-20 20:12:52 +00:00
phk
36b357552e Add the remaning part of the new libdisk interaction.
WARNING:  This is not a published interface, it is a stopgap measure for
WARNING:  libdisk so we can get 5.0-R out of the door.

Sponsored by:	DARPA & NAI Labs
2002-10-28 22:43:54 +00:00
phk
b7e23599cf Reduce the GEOM verbosity under bootverbose to something more sufferable.
This is not quite the set of information I would want, but the tree where
I have the "correct" version is messed up with conflicts.

Sponsored by:	DARPA & NAI Labs.
2002-10-25 20:09:45 +00:00
phk
af63f9546a Now that the sectorsize and mediasize are properties of the provider,
don't take the detour over the I/O path to discover them using getattr(),
we can just pick them out directly.

Do note though, that for now they are only valid after the first open
of the underlying disk device due compatibility with the old disk_create()
API.  This will change in the future so they will always be valid.

Sponsored by:   DARPA & NAI Labs.
2002-10-20 20:28:24 +00:00
phk
5df21f9258 Make the sectorsize a property of providers so we can include it in the XML
output.

Sponsored by:	DARPA & NAI Labs
2002-10-20 19:18:07 +00:00
phk
536319e740 Use %jd instead of %lld now that we have it. 2002-10-20 18:48:12 +00:00
phk
3e0c54e506 Remove a bogus local variable.
Sponsored by:	DARPA & NAI Labs.
2002-10-14 21:22:23 +00:00
phk
852521acba Retire g_io_fail() and let g_io_deliver() take an error argument instead.
Sponsored by:	DARPA & NAI Labs.
2002-09-30 08:54:46 +00:00
phk
6b59496dd8 Style, whitespace and lint fixes.
Sponsored by:	DARPA & NAI Labs.
2002-09-28 11:57:20 +00:00
phk
19335151f1 First confirmed kill from my Flexelint license: Check return value
of g_clone_bio().

Detected by:	http://www.gimpel.com/html/flex.htm
Sponsored by:	DARPA & NAI Labs.
2002-09-28 08:16:50 +00:00
phk
bd4b849139 Add the new g_slice_config() call, which can add/delete/change a slice,
with support for trying, doing and forcing.

This will eventually replace g_slice_addslice() which gets changed from
grabbing topology to requing it in this commit as well.

Sponsored by:   DARPA & NAI Labs.
2002-09-27 21:37:11 +00:00
phk
5002cfbb7e Add checks for g_clone_bio() returning NULL, it will be possible RSN.
Sponsored by:	DARPA & NAI Labs.
2002-09-27 20:47:23 +00:00
phk
411db1de5a Improve some on the naming.
Submitted by:	iedowse
2002-06-09 10:57:34 +00:00
phk
c98504cdac Include needed #include for regression tests.
Sponsored by: DARPA & NAI Labs.
2002-05-19 18:59:39 +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
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
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
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
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
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
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
a920edd5b3 Try to get used to architectures which are picky about alignment. 2002-03-15 21:41:41 +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