POSIX 1003.1 says this about aio_read() and aio_write():
If an error condition is encountered during queuing, the function
call shall return without having initiated or queued the request.
If you intend to ever allow a POSIX wrapper to these interfaces (I have
one, for instance), you need to return EINVAL, EBADF, and the like from
io_submit(). Note that io_submit() has read-like semantics, so an
additional call may be necessary if some iocbs were successfully queued.
A user has to handle EAGAIN, so io_submit() cannot return void, and you
already have error handling logic here.
Joel
--"Born under a bad sign. I been down since I began to crawl. If it wasn't for bad luck, I wouldn't have no luck at all."
http://www.jlbec.org/ jlbec@evilplan.org - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/