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
9dfffbc959
Get rid of trivial function g_destroy_event().
2003-05-02 05:26:19 +00:00
Poul-Henning Kamp
c8589ad169
Add a new flag, EV_CANCELED, and use it to make g_waitfor_event() return
...
EAGAIN if an event got canceled.
2003-05-01 19:43:52 +00:00
Poul-Henning Kamp
2ab31b05ba
When events on a reference is cancelled, check our doorstep first,
...
it might be an orphan.
2003-05-01 19:24:00 +00:00
Poul-Henning Kamp
0a9c130c06
Introduce a g_waitfor_event() function which posts an event and waits for
...
it to be run (or cancelled) and use this instead of home-rolled versions.
2003-04-23 21:28:27 +00:00
Poul-Henning Kamp
a974614b05
More of the event stuff can now be private to geom_event.c
2003-04-23 20:54:42 +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
d98777f8db
Remove the now unused hardcoded g_post_event() event support.
2003-04-23 20:25:33 +00:00
Poul-Henning Kamp
9ab3ea7841
Turn EV_NEW_PROVIDER into a g_call_me() event.
2003-04-23 20:16:13 +00:00
Poul-Henning Kamp
f2e9a09494
Convert EV_SPOILED event to use g_call_me().
2003-04-23 20:06:38 +00:00
Poul-Henning Kamp
9972896c00
Turn the hardwired NEW_CLASS event into a g_call_me() event.
2003-04-23 19:34:38 +00:00
Poul-Henning Kamp
b5cba4167f
Move the shutdown eventhandler stuff to a more logical place.
2003-04-23 19:15:27 +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
2b454c0ae5
Fix a bug which resulted in orphanization getting confused every now
...
and then.
2003-04-12 16:36:19 +00:00
Poul-Henning Kamp
316aed030e
Add handling for cancelled events in the g_call_me() methods.
2003-04-02 21:10:04 +00:00
Poul-Henning Kamp
afcbcfaed0
Change events to have an array of "void *" references, and give the
...
event posting functions varargs to fill these.
Attribute g_call_me() to appropriate g_geom's where necessary.
Add a flag argument to g_call_me() methods which will be used to signal
cancellation of events in the future.
This commit should be a no-op.
2003-04-02 20:41:18 +00:00
Poul-Henning Kamp
fbf79df3b8
Save a lock: Grab the stall_events SX lock exclusively so it also serialize
...
OAM reqests.
2003-03-24 13:35:06 +00:00
Poul-Henning Kamp
dddc28bfe0
Introduce g_cancel_events() and use it a couple of places where it makes
...
sense.
2003-03-23 23:01:40 +00:00
Poul-Henning Kamp
d943f1b0b9
Introduce an SX lock which allows us to stall event processing
...
during OAM operations.
2003-03-23 21:58:09 +00:00
Poul-Henning Kamp
20d2026b4e
#ifdef notyet a bit of code which needs not yet committed refcounting to
...
work correctly.
2003-03-16 16:29:04 +00:00
Poul-Henning Kamp
e582990901
If we run out of consumers while orphaning them, and the provider's geom
...
is withering, destroy the provider when done.
This was exposed by the recent change to geom_dev's orphaning logic.
2003-03-10 23:41:41 +00:00
Poul-Henning Kamp
f48b881942
Stamp out Danglish.
2003-03-09 10:02:31 +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
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
abb50a48e8
Remove g_silence(). It does not do anything anymore.
2003-01-13 08:46:32 +00:00
Poul-Henning Kamp
a9ed5e1173
Polish a bit here and there.
...
Reenable the geom.ctl device so people can play with gbde.
Sponsored by: DARPA & NAI Labs
2002-11-04 09:31:02 +00:00
Poul-Henning Kamp
cd4f50fbb8
Make sure we don't loose our topology lock in a call_me() handler.
...
Sponsored by: DARPA & NAI Labs.
2002-09-30 08:27:29 +00:00
Poul-Henning Kamp
346cd5fe2d
Implement g_call_me() as a way for geom methods to schedule operations
...
to be performed in the event-thread.
To do this, we need to lock the eventlist with g_eventlock (nee g_doorlock),
since g_call_me() being called from the UP/DOWN paths will not be able to
aquire g_topology_lock.
This also means that for now these events are not referenced on any
particular consumer/provider/geom.
For UP/DOWN path use, this will not become a problem since the access()
function will make sure we drain any bio's before we dismantle.
Sponsored by: DARPA & NAI Labs.
2002-09-27 20:38:36 +00:00
Poul-Henning Kamp
e615b0fd93
Ok, include also the two tests which actually does effect the claims
...
of the last commit message.
Sponsored by: DARPA & NAI Labs.
2002-09-27 20:30:27 +00:00
Poul-Henning Kamp
ed0ff8e52d
Hook into the shutdown EVENTHANDLER and stop tasting things after we
...
get notified to make things settle a bit faster.
Sponsored by: DARPA & NAI Labs.
2002-09-27 20:23:35 +00:00
Poul-Henning Kamp
903e43fe66
Rename the doorlock to eventlock, it gets to protect a bit more in the future.
...
Sponsored by: DARPA & NAI Labs.
2002-09-27 20:18:16 +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
855f8b26f2
Only clear the spoiled flag if the class had no spoiled method, the spoiled
...
method may have deallocated the consumer already and modifying free()'ed
memory is bad style.
Sponsored by: DARPA & NAI Labs.
2002-05-26 17:17:25 +00:00
Poul-Henning Kamp
4b8374a778
Don't grab Giant around malloc(9) and free(9).
...
Don't grab Giant around wakeup(9).
Don't print verbose messages about each device found in geom_dev.
Various cleanups.
Sponsored by: DARPA & NAI Labs.
2002-05-20 10:03:15 +00:00
John Baldwin
6008862bc2
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
Poul-Henning Kamp
07d77fc610
Move access and orphan member functions from class to geom.
...
Sponsored by: DARPA & NAI Labs
2002-04-04 09:54:13 +00:00
Poul-Henning Kamp
2654e1fc4e
s/classs/classes/ to fixup grammer after the previous global renaming.
...
Sponsored by: DARPA & NAI Labs
2002-04-04 09:41:47 +00:00
Poul-Henning Kamp
b1876192f0
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
Poul-Henning Kamp
e805e8f0e8
Cave in to tradition and rename "methods" to "classes".
2002-03-26 21:40:06 +00:00
Poul-Henning Kamp
dd84a43c1d
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