summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2017-04-11 17:15:39 +0000
committermarkj <markj@FreeBSD.org>2017-04-11 17:15:39 +0000
commite35af4bc35a458721dbadb5652a9b6e6d13d294b (patch)
tree6b032252b8c55ee05f9b6b539f3c6e4ba7dbb5c9
parente87dbda4baca9928cb73b90c4635c686681dfc64 (diff)
downloadFreeBSD-src-e35af4bc35a458721dbadb5652a9b6e6d13d294b.zip
FreeBSD-src-e35af4bc35a458721dbadb5652a9b6e6d13d294b.tar.gz
MFC r316175:
Avoid sleeping when the mirror I/O queue is non-empty.
-rw-r--r--sys/geom/mirror/g_mirror.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index bf38e6e..2c65243 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -1894,6 +1894,10 @@ g_mirror_worker(void *arg)
kproc_exit(0);
}
mtx_lock(&sc->sc_queue_mtx);
+ if (bioq_first(&sc->sc_queue) != NULL) {
+ mtx_unlock(&sc->sc_queue_mtx);
+ continue;
+ }
}
sx_xunlock(&sc->sc_lock);
/*
OpenPOWER on IntegriCloud