diff options
author | mav <mav@FreeBSD.org> | 2015-04-09 13:09:05 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-04-09 13:09:05 +0000 |
commit | 2e38078077c5e0f74c769cb66f0ecaa931f8186e (patch) | |
tree | 92cfec1ca24ab35cbb70a7a57690f18851f4d602 /sys/geom | |
parent | 1af0fcc87ba7c58849e9f6ad9e0d7a8f8ace2e4d (diff) | |
download | FreeBSD-src-2e38078077c5e0f74c769cb66f0ecaa931f8186e.zip FreeBSD-src-2e38078077c5e0f74c769cb66f0ecaa931f8186e.tar.gz |
Remove sleeps from geom_up thread on device destruction.
MFC after: 3 days.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_dev.c | 2 | ||||
-rw-r--r-- | sys/geom/multipath/g_multipath.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index decbbe0..2539e1b 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -572,7 +572,7 @@ g_dev_done(struct bio *bp2) } mtx_unlock(&sc->sc_mtx); if (destroy) - g_post_event(g_dev_destroy, cp, M_WAITOK, NULL); + g_post_event(g_dev_destroy, cp, M_NOWAIT, NULL); biodone(bp); } diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index 7593cca..0953d18 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -369,9 +369,9 @@ g_multipath_done(struct bio *bp) mtx_lock(&sc->sc_mtx); (*cnt)--; if (*cnt == 0 && (cp->index & MP_LOST)) { - cp->index |= MP_POSTED; + if (g_post_event(g_mpd, cp, M_NOWAIT, NULL) == 0) + cp->index |= MP_POSTED; mtx_unlock(&sc->sc_mtx); - g_post_event(g_mpd, cp, M_WAITOK, NULL); } else mtx_unlock(&sc->sc_mtx); g_std_done(bp); |