Ensure that we honor aio_read/write() returning EAGAIN
This fixes a problem on OSX, where the number of resources for
aio is woefully small.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/engines/posixaio.c b/engines/posixaio.c
index 061812e..867b5f7 100644
--- a/engines/posixaio.c
+++ b/engines/posixaio.c
@@ -184,6 +184,13 @@
}
if (ret) {
+ /*
+ * At least OSX has a very low limit on the number of pending
+ * IOs, so if it will return EAGAIN.
+ */
+ if (errno == EAGAIN)
+ return FIO_Q_BUSY;
+
io_u->error = errno;
td_verror(td, io_u->error, "xfer");
return FIO_Q_COMPLETED;