According to the manpages io_submit() can return the value: EAGAIN Insufficient resources are available to queue any iocbs. We should handle this opportunely trying to re-submit the AIO request again. Maybe an even better approach could be to just sleep a bit before trying to re-submit the request. In any case this would resolve a never-ending loop in aio01.c, where io_getevents() can be continuously called without having issued any actual request if io_submit() failed with -EAGAIN. Signed-off-by: Andrea Righi <righi.andrea@gmail.com>.
2 files changed