aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-03-29 22:34:37 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-03-29 22:34:37 +0000
commit376ceb799f49be3acc1937dc2a2aeb53304a3051 (patch)
treea524e30e43b52ef4c83a00f26f5832b30a65b45a
parent672fc9ebf62c50f4d95bcb81251c8b41f33761eb (diff)
downloadsrc-376ceb799f49be3acc1937dc2a2aeb53304a3051.tar.gz
src-376ceb799f49be3acc1937dc2a2aeb53304a3051.zip
Fix a bug in the ENOMEM pacing code which probably made it panic systems
after a lot of ENOMEM errors.
Notes
Notes: svn path=/head/; revision=112830
-rw-r--r--sys/geom/geom_io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index d63167009ca1..488d409f675e 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -348,6 +348,10 @@ g_io_schedule_down(struct thread *tp __unused)
continue;
}
g_bioq_unlock(&g_bio_run_down);
+ if (pace > 0) {
+ msleep(&error, NULL, PRIBIO, "g_down", hz/10);
+ pace--;
+ }
error = g_io_check(bp);
if (error) {
g_io_deliver(bp, error);
@@ -375,10 +379,6 @@ g_io_schedule_down(struct thread *tp __unused)
mtx_lock(&mymutex);
bp->bio_to->geom->start(bp);
mtx_unlock(&mymutex);
- if (pace) {
- pace--;
- break;
- }
}
}