History log of /freebsd-current/sys/geom/geom_event.c
Revision Date Author Comments
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# cc1ec772 22-Jul-2022 Konstantin Belousov <kib@FreeBSD.org>

Adjust g_waitidle() visibility and definition

Explicitly pass the struct thread argument.
Move the function prototype from sys/systm.h to geom/geom.h, we do not
need almost each kernel source to see the prototype, it is now used
only by kern/vfs_mountroot.c outside geom/geom_event.c, where the
function is defined.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D35888


# c6d31b83 18-Jul-2022 Konstantin Belousov <kib@FreeBSD.org>

AST: rework

Make most AST handlers dynamically registered. This allows to have
subsystem-specific handler source located in the subsystem files,
instead of making subr_trap.c aware of it. For instance, signal
delivery code on return to userspace is now moved to kern_sig.c.

Also, it allows to have some handlers designated as the cleanup (kclear)
type, which are called both at AST and on thread/process exit. For
instance, ast(), exit1(), and NFS server no longer need to be aware
about UFS softdep processing.

The dynamic registration also allows third-party modules to register AST
handlers if needed. There is one caveat with loadable modules: the
code does not make any effort to ensure that the module is not unloaded
before all threads processed through AST handler in it. In fact, this
is already present behavior for hwpmc.ko and ufs.ko. I do not think it
is worth the efforts and the runtime overhead to try to fix it.

Reviewed by: markj
Tested by: emaste (arm64), pho
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D35888


# ac315343 26-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Adjust function definitions in geom_event.c to avoid clang 15 warnings

With clang 15, the following -Werror warnings are produced:

sys/geom/geom_event.c:261:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
g_run_events()
^
void
sys/geom/geom_event.c:405:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
g_do_wither()
^
void
sys/geom/geom_event.c:449:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
g_event_init()
^
void

This is because g_run_events(), g_do_wither(), and g_event_init() are
declared with (void) argument lists, but defined with empty argument
lists. Make the definitions match the declarations.

MFC after: 3 days


# f4bf48c2 27-Dec-2021 Alexander Motin <mav@FreeBSD.org>

GEOM: Minor polishing in geom_event.

- Remove timeouts from msleep()'s. Those should always be woken up.
- Move wakeup() under the lock to not call on possibly freed pointer.
- Remove some dead code.

MFC after: 2 weeks


# 380710a5 23-Jul-2021 Warner Losh <imp@FreeBSD.org>

geom: create an API to allocate events, and use that storage to send them

g_alloc_event will allocate storage for an opaque event. g_post_event_ep
can use memory returned by g_alloc_event to send an event from a context
that might not be able to allocate the event. Occasionally, we can
alloate memory when we create an object, but not while we're destroy
it. This allows one to allocate at creation time memory to use when
destorying the object.

Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30544


# 60f083ef 14-Sep-2020 Edward Tomasz Napierala <trasz@FreeBSD.org>

Move TDP_GEOM check from userret() to ast(); this code path is quite
infrequent.

Reviewed by: kib
No objections: mav
Tested by: pho
MFC after: 2 weeks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D26374


# d40bc607 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

geom: clean up empty lines in .c and .h files


# 9794a803 29-Dec-2019 Alexander Motin <mav@FreeBSD.org>

Retire nstart/nend counters.

Those counters were abused for decade to workaround broken orphanization
process in different classes by delaying the call while there are active
requests. But from one side it did not close all the races, while from
another was quite expensive on SMP due to trashing twice per request cache
lines of consumer and provider and requiring locks. It lost its sense
after I manually went through all the GEOM classes in base and made
orphanization wait for either provider close or request completion.

Consumer counters are still used under INVARIANTS to detect premature
consumer close and detach. Provider counters are removed completely.

Sponsored by: iXsystems, Inc.


# 8b8a7c43 31-Dec-2017 Colin Percival <cperciva@FreeBSD.org>

Instrument "boot holds" for the benefit of the TSLOG framework. These
are places where the "main thread" of the booting kernel (either the
thread which later becomes swapper or the thread which later becomes
init) has to stop and wait for action to take place in another thread
before continuing.

There are currently three such holds:
1. The intr_config_hooks SYSINIT waits for hooks registered via the
config_intrhook_establish function; this allows (typically) devices
which need interrupts enabled to complete their initialization to do
so before root is mounted.

2. The g_waitidle function waits for the GEOM event queue to be empty;
this ensures that all of the disks which have been attached have been
tasted before we attempt to mount root.

3. The vfs_mountroot_wait function (in addition to calling g_waitidle)
waits for holds registered via root_mount_hold; among other things, this
is used by the USB subsystem to ensure that we don't fail to mount root
if it's located on a USB disk which takes a while to probe.


# 3728855a 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/geom: adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# dff9131e 20-May-2016 Konstantin Belousov <kib@FreeBSD.org>

Remove asserts that Giant is not held on entrance into geom KPI, which
outlived their usefulness. This allows to remove drop/pickup Giant
wrappers around GEOM calls.

Discussed with: alfred, imp, phk
Sponsored by: The FreeBSD Foundation


# 362073c0 19-May-2014 Andrey V. Elsukov <ae@FreeBSD.org>

We have two functions from where a geom orphan method could be called:
g_orphan_register and g_resize_provider_event. Both are called from the
event queue. Also we have GEOM_DEV class, which does deferred destroy
for its consumers via g_dev_destroy (also called from the event queue).
So it is possible, that for some consumers an orphan method will be
called twice. This triggers panic in g_dev_orphan.
Check that consumer isn't already orphaned before call orphan method.

MFC after: 2 weeks


# 50199fa0 23-Mar-2013 Alexander Motin <mav@FreeBSD.org>

Make g_wither_washer() to not loop by itself, but only when there was some
more topology change done that may require its attention. Add few missing
g_do_wither() calls in respective places to signal it.

This fixes potential infinite loop here when some provider is withered, but
still opened or connected for some reason and so can not be destroyed. For
example, see r227009 and r227510.


# 3631c638 29-Jul-2012 Alexander Motin <mav@FreeBSD.org>

Implement media change notification for DA and CD removable media devices.
It includes three parts:
1) Modifications to CAM to detect media media changes and report them to
disk(9) layer. For modern SATA (and potentially UAS) devices it utilizes
Asynchronous Notification mechanism to receive events from hardware.
Active polling with TEST UNIT READY commands with 3 seconds period is used
for incapable hardware. After that both CD and DA drivers work the same way,
detecting two conditions: "NOT READY: Medium not present" after medium was
detected previously, and "UNIT ATTENTION: Not ready to ready change, medium
may have changed". First one reported to disk(9) as media removal, second
as media insert/change. To reliably receive second event new
AC_UNIT_ATTENTION async added to make UAs broadcasted to all periphs by
generic error handling code in cam_periph_error().
2) Modifications to GEOM core to handle media remove and change events.
Media removal handled by spoiling all consumers attached to the provider.
Media change event also schedules provider retaste after spoiling to probe
new media. New flag G_CF_ORPHAN was added to consumers to reflect that
consumer is in process of destruction. It allows retaste to create new
geom instance of the same class, while previous one is still dying.
3) Modifications to some GEOM classes: DEV -- to report media change
events to devd; VFS -- to handle spoiling same as orphan to prevent
accessing replaced media. PART class already handles spoiling alike to
orphan.

Reviewed by: silence on geom@ and scsi@
Tested by: avg
Sponsored by: iXsystems, Inc. / PC-BSD
MFC after: 2 months


# 20a5d5dc 01-Nov-2011 Alexander Motin <mav@FreeBSD.org>

Workaround the problem introduced by combination of r162200 and r215687.
r162200 delays provider orphanization until all running requests complete,
to workaround broken orphan() method implementation in some classes.
r215687 removes persistent periodic (10Hz) event thread wake ups.
Together these changes can indefinitely delay orphanization until some
other event wake up the event thread. One consequence of this is inability
of CAM to destroy device disconnected when busy and, as consequence, create
new one after reconnection.

While the best solution would be to revert r162200, it is not easy, as
some classes still look broken in that way. Instead conditionally wake up
event thread if there are some providers waiting for orphanization.

MFC after: 1 week


# 416494d7 14-Jun-2011 Justin T. Gibbs <gibbs@FreeBSD.org>

Plumb device physical path reporting from CAM devices, through GEOM and
DEVFS, and make it accessible via the diskinfo utility.

Extend GEOM's generic attribute query mechanism into generic disk consumers.
sys/geom/geom_disk.c:
sys/geom/geom_disk.h:
sys/cam/scsi/scsi_da.c:
sys/cam/ata/ata_da.c:
- Allow disk providers to implement a new method which can override
the default BIO_GETATTR response, d_getattr(struct bio *). This
function returns -1 if not handled, otherwise it returns 0 or an
errno to be passed to g_io_deliver().

sys/cam/scsi/scsi_da.c:
sys/cam/ata/ata_da.c:
- Don't copy the serial number to dp->d_ident anymore, as the CAM XPT
is now responsible for returning this information via
d_getattr()->(a)dagetattr()->xpt_getatr().

sys/geom/geom_dev.c:
- Implement a new ioctl, DIOCGPHYSPATH, which returns the GEOM
attribute "GEOM::physpath", if possible. If the attribute request
returns a zero-length string, ENOENT is returned.

usr.sbin/diskinfo/diskinfo.c:
- If the DIOCGPHYSPATH ioctl is successful, report physical path
data when diskinfo is executed with the '-v' option.

Submitted by: will
Reviewed by: gibbs
Sponsored by: Spectra Logic Corporation

Add generic attribute change notification support to GEOM.

sys/sys/geom/geom.h:
Add a new attrchanged method field to both g_class
and g_geom.

sys/sys/geom/geom.h:
sys/geom/geom_event.c:
- Provide the g_attr_changed() function that providers
can use to advertise attribute changes.
- Perform delivery of attribute change notifications
from a thread context via the standard GEOM event
mechanism.

sys/geom/geom_subr.c:
Inherit the attrchanged method from class to geom (class instance).

sys/geom/geom_disk.c:
Provide disk_attr_changed() to provide g_attr_changed() access
to consumers of the disk API.

sys/cam/scsi/scsi_pass.c:
sys/cam/scsi/scsi_da.c:
sys/geom/geom_dev.c:
sys/geom/geom_disk.c:
Use attribute changed events to track updates to physical path
information.

sys/cam/scsi/scsi_da.c:
Add AC_ADVINFO_CHANGED to the registered asynchronous CAM
events for this driver. When this event occurs, and
the updated buffer type references our physical path
attribute, emit a GEOM attribute changed event via the
disk_attr_changed() API.

sys/cam/scsi/scsi_pass.c:
Add AC_ADVINFO_CHANGED to the registered asynchronous CAM
events for this driver. When this event occurs, update
the physical patch devfs alias for this pass instance.

Submitted by: gibbs
Sponsored by: Spectra Logic Corporation


# f7842e00 22-Nov-2010 Jaakko Heinonen <jh@FreeBSD.org>

Use g_eventlock to protect against losing wakeups in the g_event process
and replace tsleep(9) with msleep(9) which doesn't use a timeout. The
previously used timeout caused the event process to wake up ten times
per second on an idle system.

one_event() is now called with the topology lock held and it returns
with both the topology and event locks held when there are no more
events in the queue.

Reported by: mav, Marius NĂ¼nnerich
Reviewed by: freebsd-geom


# 9d142a6e 03-Nov-2010 Jaakko Heinonen <jh@FreeBSD.org>

Extend the g_eventlock mutex coverage in one_event() to include setting
of the EV_DONE flag and use the mutex to protect against losing wakeups
in g_waitfor_event().

Reported by: davidxu
Tested by: davidxu
Discussed on: freebsd-current


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 59ccfe81 08-Jun-2010 Matt Jacob <mjacob@FreeBSD.org>

Try and narrow the gap in which you act on an event that has been canceled.
Obtained from: Jaako Heinonen
MFC after: 1 month


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 3ea5d7ec 27-Sep-2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>

When orphaning a provider, cancel events related to it.
Without this change the following situation was possible:

1. Provider is orphaned from within class' access() method on last write
close - orphan provider event is send.
2. GEOM detects last write close on a provider and sends new provider event.
3. g_orphan_register() is called, and calls all orphan methods of attached
consumers.
4. New provider event is executed on orphaned provider, all classes can
taste already orphaned provider, and some may attach consumers to it.
Those consumers will never go away, because the g_orphan_register()
was already called.

We end up with a zombie provider.

With this change, at step 3, we will cancel new provider event.

How to repeat this problem:

# mdconfig -a -t malloc -s 10m
# geli init -i 0 md0
# geli attach md0
# newfs -L test /dev/md0.eli
# mount /dev/ufs/test /mnt/tmp
# geli detach -l md0.eli
# umount /mnt/tmp
# glabel status
Name Status Components
ufs/test N/A N/A

Reviewed by: phk
Approved by: re (kensmith)


# d6b910d2 10-Sep-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Delay an orphan event if provider has still in-flight I/O requests.
This way GEOM classes can safely detach from provider when an orphan
event is received. This fixes 'detach with active requests' panic for
gstripe/gconcat under load.

PR: kern/102766
Submitted by: mjacob
OK'ed by: phk
MFC after: 1 week


# e4da09c0 04-Sep-2005 Poul-Henning Kamp <phk@FreeBSD.org>

Remove a race condition that could result in processes being stuck
waiting for geom events to happen:

Instead of maintaining a count of outstanding events, simply look if
the queue is empty. Make sure to not remove events from the queue
until they are executed in order to not open a new race.

Much work by: pjd
Tested by: kris
MT6: yes, should be.


# d246aa55 18-May-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Correct typo.


# b8005b9b 09-Nov-2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Introduce g_waitidlelock() function which is simlar to g_waitidle(),
but should be called with the topology lock held and returns with the
topology lock held and empty event queue.

Approved by: phk (sometime ago)


# 9197ce2e 23-Oct-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Add a new per-thread private flag: TDP_GEOM.

This flag gets set whenever the thread posts an event on the GEOM
event queue, and if the flag is set when the thread is prepared
to return to userland from the kernel, g_waitidle() will be called
to make sure that the posted events have completed.

This can replace an insufficient number of g_waitidle() calls in
various other places, and has the advantage of being failsafe: Any
system call which does a VOP_OPEN()/VOP_CLOSE will now correctly
wait for any geom events it posted as part of spoils or tastes.

Assert that topology and Giant is not held in g_waitidle().


# 1b464bd8 08-Jul-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Make withering water tight.

When we orphan/wither a provider, an attached geom+consumer could
end up being withered as a result and it may be in front of us in
the normal object scanning order so we need to do multi-pass. On
the other hand, there may be withering stuff we can't get rid off
(yet), so we need to keep track of both the existence of withering
stuff and if there is more we can do at this time.


# 3d1d5bc3 10-Mar-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Rearrange some of the GEOM debugging tools to be more structured.

Retire g_sanity() and corresponding debugflag (0x8)

Retire g_{stall,release}_events().

Under #ifdef DIAGNOSTIC:

Make g_valid_obj() an official function and have it return an an
non-zero integer which indicates the kind of object when found.

Implement G_VALID_{CLASS,GEOM,CONSUMER,PROVIDER}() macros based
on g_valid_obj().

Sprinkle calls to these macros liberally over the infrastructure.

Always check that we do not free a live object.


# 18e88d82 10-Feb-2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Now we have g_topology_assert_not(), so use it to detect deadlocks.

Approved by: phk, scottl (mentor)


# 793ffa8e 02-Feb-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Don't mingle malloc/g_event flags.

Spotted by: pjd@


# 57ab2e04 23-Jan-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Make sure to keep track of canceled events.

Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>


# 8592d7a7 23-Dec-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Prevent withering of the provider we're orphaning from happening until
we do it ourselves.

Nailed by: Simon Heath <heath@cng.fr>


# d0265773 07-Dec-2003 Poul-Henning Kamp <phk@FreeBSD.org>

KASSERT against multiple orphanings of providers.


# e0d617c1 18-Nov-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Fix a harmless bug and add a ')' in a debugging printf.

Submitted by: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>


# b144e6ff 12-Oct-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Destroy providers maked with G_PF_WITHER when the last consumer has detached.


# 50b1faef 11-Jun-2003 David E. O'Brien <obrien@FreeBSD.org>

Use __FBSDID().

Approved by: phk


# a1a9b445 07-Jun-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Add missing va_end() calls.

Noticed by: tmm


# 9dfffbc9 01-May-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Get rid of trivial function g_destroy_event().


# c8589ad1 01-May-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Add a new flag, EV_CANCELED, and use it to make g_waitfor_event() return
EAGAIN if an event got canceled.


# 2ab31b05 01-May-2003 Poul-Henning Kamp <phk@FreeBSD.org>

When events on a reference is cancelled, check our doorstep first,
it might be an orphan.


# 0a9c130c 23-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# a974614b 23-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

More of the event stuff can now be private to geom_event.c


# 8cd1535a 23-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Rename g_call_me() to g_post_event(), and give it a flag
argument to determine if we can M_WAITOK in malloc.


# d98777f8 23-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Remove the now unused hardcoded g_post_event() event support.


# 9ab3ea78 23-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Turn EV_NEW_PROVIDER into a g_call_me() event.


# f2e9a094 23-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Convert EV_SPOILED event to use g_call_me().


# 9972896c 23-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Turn the hardwired NEW_CLASS event into a g_call_me() event.


# b5cba416 23-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Move the shutdown eventhandler stuff to a more logical place.


# 3924ad70 13-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# 2b454c0a 12-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Fix a bug which resulted in orphanization getting confused every now
and then.


# 316aed03 02-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Add handling for cancelled events in the g_call_me() methods.


# afcbcfae 02-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# fbf79df3 24-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Save a lock: Grab the stall_events SX lock exclusively so it also serialize
OAM reqests.


# dddc28bf 23-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Introduce g_cancel_events() and use it a couple of places where it makes
sense.


# d943f1b0 23-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Introduce an SX lock which allows us to stall event processing
during OAM operations.


# 20d2026b 16-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

#ifdef notyet a bit of code which needs not yet committed refcounting to
work correctly.


# e5829909 10-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# f48b8819 09-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Stamp out Danglish.


# a163d034 18-Feb-2003 Warner Losh <imp@FreeBSD.org>

Back out M_* changes, per decision of the TRB.

Approved by: trb


# 44956c98 21-Jan-2003 Alfred Perlstein <alfred@FreeBSD.org>

Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.


# abb50a48e 13-Jan-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Remove g_silence(). It does not do anything anymore.


# a9ed5e11 04-Nov-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Polish a bit here and there.
Reenable the geom.ctl device so people can play with gbde.

Sponsored by: DARPA & NAI Labs


# cd4f50fb 30-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Make sure we don't loose our topology lock in a call_me() handler.

Sponsored by: DARPA & NAI Labs.


# 346cd5fe 27-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# e615b0fd 27-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Ok, include also the two tests which actually does effect the claims
of the last commit message.

Sponsored by: DARPA & NAI Labs.


# ed0ff8e5 27-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# 903e43fe 27-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Rename the doorlock to eventlock, it gets to protect a bit more in the future.

Sponsored by: DARPA & NAI Labs.


# 503abe45 09-Jun-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Improve some on the naming.

Submitted by: iedowse


# 855f8b26 26-May-2002 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# 4b8374a7 20-May-2002 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# 6008862b 04-Apr-2002 John Baldwin <jhb@FreeBSD.org>

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


# 07d77fc6 04-Apr-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Move access and orphan member functions from class to geom.

Sponsored by: DARPA & NAI Labs


# 2654e1fc 04-Apr-2002 Poul-Henning Kamp <phk@FreeBSD.org>

s/classs/classes/ to fixup grammer after the previous global renaming.

Sponsored by: DARPA & NAI Labs


# b1876192 26-Mar-2002 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# e805e8f0 26-Mar-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Cave in to tradition and rename "methods" to "classes".


# dd84a43c 11-Mar-2002 Poul-Henning Kamp <phk@FreeBSD.org>

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