Fix a bug in the ENOMEM pacing code which probably made it panic systems

after a lot of ENOMEM errors.
This commit is contained in:
phk 2003-03-29 22:34:37 +00:00
parent 446c24ca7a
commit 15c9ea202d

View File

@ -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;
}
}
}