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
This commit is contained in:
pjd 2006-09-10 09:11:54 +00:00
parent 25ac1031f0
commit d06bfaa1a9

View File

@ -183,7 +183,10 @@ one_event(void)
g_topology_lock();
for (;;) {
mtx_lock(&g_eventlock);
pp = TAILQ_FIRST(&g_doorstep);
TAILQ_FOREACH(pp, &g_doorstep, orphan) {
if (pp->nstart == pp->nend)
break;
}
if (pp != NULL) {
G_VALID_PROVIDER(pp);
TAILQ_REMOVE(&g_doorstep, pp, orphan);