diff options
author | pjd <pjd@FreeBSD.org> | 2006-09-10 09:11:54 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-09-10 09:11:54 +0000 |
commit | d06bfaa1a96c6da560cc7f02256c7b4f8d4607ef (patch) | |
tree | 00c16fda889d414f932d36606fb5093e1c5f9c62 /sys/geom/geom_event.c | |
parent | 25ac1031f0c342b734a8a33e715474453d7ef1e2 (diff) | |
download | FreeBSD-src-d06bfaa1a96c6da560cc7f02256c7b4f8d4607ef.zip FreeBSD-src-d06bfaa1a96c6da560cc7f02256c7b4f8d4607ef.tar.gz |
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
Diffstat (limited to 'sys/geom/geom_event.c')
-rw-r--r-- | sys/geom/geom_event.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index 32351c3..5288e32 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -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); |