Marcel Moolenaar
d99c155975
Add g_wither_provider() to abstract the details of destroying a
...
particular provider. Use this function where g_orphan_provider()
is being called so that the flags are updated correctly and
g_orphan_provider() is called only when allowed.
2006-04-10 03:55:13 +00:00
Pawel Jakub Dawidek
bdf2e45a5c
Allow to use g_slice_orphan() from outside.
...
MFC after: 3 days
2006-02-18 11:21:17 +00:00
Craig Rodrigues
318c3a55f0
Fix so that when a slice or a partition is removed through g_slice_config(),
...
it is destroyed in GEOM, in addition to being removed from /dev.
Before this patch, if you applied a new MBR which deleted a slice,
the deleted slice would not be in /dev, but it would still appear
in kern.geom.conftxt and kern.geom.confxml, which would confused
the diskPartitionEditor in sysinstall.
Submitted by: pjd
Tested by: pjd, rodrigc
MFC after: 1 week
2005-09-14 21:38:35 +00:00
Poul-Henning Kamp
2859a695dc
Stop wasting a bootverbose line on all geom slices.
2004-11-03 09:08:10 +00:00
Poul-Henning Kamp
a9654c8c58
Do not override the class provided dumpconf function.
2004-08-18 21:42:08 +00:00
Lukas Ertl
5289667c16
Check for a NULL pointer before dereferencing it.
2004-07-25 09:41:31 +00:00
Poul-Henning Kamp
8529ce7a87
We only need to check for overlaps if we increasing access counts.
2004-07-04 13:44:48 +00:00
Pawel Jakub Dawidek
916a3aa05b
Free only if pointer isn't NULL.
2004-07-01 12:42:13 +00:00
Pawel Jakub Dawidek
40f798dad1
Don't force class to give a valid softc to g_slice_new(), it is not always
...
needed.
Approved by: phk
2004-06-24 10:50:20 +00:00
Poul-Henning Kamp
d2bae332d6
Remove the absolute count g_access_abs() function since experience has
...
shown that it is not useful.
Rename the relative count g_access_rel() function to g_access(), only
the name has changed.
Change all g_access_rel() calls in our CVS tree to call g_access() instead.
Add an #ifndef BURN_BRIDGES #define of g_access_rel() for source
code compatibility.
2004-02-12 22:42:11 +00:00
David E. O'Brien
50b1faef38
Use __FBSDID().
...
Approved by: phk
2003-06-11 06:49:16 +00:00
Poul-Henning Kamp
a1a9b44569
Add missing va_end() calls.
...
Noticed by: tmm
2003-06-07 10:16:53 +00:00
Poul-Henning Kamp
ce67c955ca
Add a destroy_geom method to the slice "library".
...
If a slice class has no destroy_geom method, use this one.
This should allow all slicers to kldload.
2003-05-31 19:25:05 +00:00
Poul-Henning Kamp
15649213a6
Use a more tailored spoil routine for slices, and take advantage of
...
g_wither_geom() to do most of the work for us.
2003-05-02 06:29:33 +00:00
Poul-Henning Kamp
82b53b8dc8
Rename g_slice_init() to the more appropriate g_slice_alloc() and give
...
it a g_slice_free() partner function.
2003-05-02 05:33:27 +00:00
Poul-Henning Kamp
8cd1535a24
Rename g_call_me() to g_post_event(), and give it a flag
...
argument to determine if we can M_WAITOK in malloc.
2003-04-23 20:46:12 +00:00
Poul-Henning Kamp
d3a1a13766
Do not mandate that slicers have a private ->start(), they may not need
...
one. KASSERT() that they have one if G_SLICE_HOT_START is used.
2003-04-22 21:19:17 +00:00
Poul-Henning Kamp
7220a9e779
Make more of the "hotspot" stuff generic:
...
Give the class a way to specify the necessary action for read/delete/write:
ALLOW, DENY, START or CALL.
Update geom_bsd to use this.
2003-04-19 10:14:39 +00:00
Poul-Henning Kamp
183a45f65e
Create a dedicated structure for holding hotspot information rather than
...
using slice structures for it.
2003-04-19 10:00:22 +00:00
Poul-Henning Kamp
3924ad705e
Time has run from the "run GEOM in userland" harness, and the new regression
...
test is built to test GEOM as running in the kernel.
This commit is basically "unifdef -D_KERNEL" to remove the mainly #include
related code to support the userland-harness.
2003-04-13 09:02:06 +00:00
Poul-Henning Kamp
0d3e96e39c
Retire the "frontstuff" record keeping, it was no match for the
...
in-band meta-data of BSD labels and a more complex solution will be needed.
2003-04-12 08:41:26 +00:00
Poul-Henning Kamp
4eba52a2d2
Remove all references to BIO_SETATTR. We will not be using it.
2003-04-03 19:19:36 +00:00
Poul-Henning Kamp
b4b138c27f
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
Warner Losh
a163d034fa
Back out M_* changes, per decision of the TRB.
...
Approved by: trb
2003-02-19 05:47:46 +00:00
Poul-Henning Kamp
8028f16b1b
Don't divide by zero if there is no stripewidth specified.
2003-02-11 15:23:41 +00:00
Poul-Henning Kamp
8a63edc3a1
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
Poul-Henning Kamp
faa7b8b96e
Propagate G_PF_CANDELETE to our own providers from the provider we attach to.
2003-02-11 12:36:33 +00:00
Alfred Perlstein
44956c9863
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
Poul-Henning Kamp
9eebd265b9
Add a check for negative offset locations and return EINVAL for them.
2002-12-17 21:31:58 +00:00
Poul-Henning Kamp
a1d5f791fa
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
Poul-Henning Kamp
0f9d3dba37
Constification and some s/int/u_int/ changes.
2002-12-16 22:33:27 +00:00
Poul-Henning Kamp
821a4d01ea
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
Poul-Henning Kamp
188321b737
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
Poul-Henning Kamp
534de7e11d
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
Poul-Henning Kamp
d518e53936
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
Poul-Henning Kamp
3d5500fc51
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
Poul-Henning Kamp
3f12caa180
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
Poul-Henning Kamp
48444d6262
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
Poul-Henning Kamp
14ac6812b9
Use %jd instead of %lld now that we have it.
2002-10-20 18:48:12 +00:00
Poul-Henning Kamp
b775674772
Remove a bogus local variable.
...
Sponsored by: DARPA & NAI Labs.
2002-10-14 21:22:23 +00:00
Poul-Henning Kamp
72840432e0
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
Poul-Henning Kamp
4ae677009e
Style, whitespace and lint fixes.
...
Sponsored by: DARPA & NAI Labs.
2002-09-28 11:57:20 +00:00
Poul-Henning Kamp
852f392456
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
Poul-Henning Kamp
5a6baf5457
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
Poul-Henning Kamp
beece77a2d
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
Poul-Henning Kamp
503abe4540
Improve some on the naming.
...
Submitted by: iedowse
2002-06-09 10:57:34 +00:00
Poul-Henning Kamp
faefe44cff
Include needed #include for regression tests.
...
Sponsored by: DARPA & NAI Labs.
2002-05-19 18:59:39 +00:00
Poul-Henning Kamp
53705e35ae
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
Poul-Henning Kamp
2285b09474
All in a days work: make a function static.
2002-04-23 19:03:03 +00:00
Poul-Henning Kamp
7d590cc46f
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