Fix infinite loop on platforms with severely limited aio resources
authorJens Axboe <jaxboe@fusionio.com>
Thu, 14 Jul 2011 10:45:13 +0000 (12:45 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 14 Jul 2011 10:45:13 +0000 (12:45 +0200)
commitccc02050c1a371385897aa964988dbab68597545
treeaa5ce1a7245cb4f424373506c8c565cb3540d4c8
parentb42ffd195f4f4263cef197a0c3d22e6937c7580f
Fix infinite loop on platforms with severely limited aio resources

Problem hit on OSX, where with 4 jobs each with a queue depth larger
than what the system supports, you can get into a situation where
any given process can get EAGAIN on queueing AIO even if it has
nothing queued already. Check for this condition to avoid fio's
IO loop going into a death spiral.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fio.c