posixaio: fix thread problem with using errno
authorJens Axboe <axboe@kernel.dk>
Wed, 6 Nov 2013 21:47:22 +0000 (14:47 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Nov 2013 21:47:22 +0000 (14:47 -0700)
commit4c057b34dfc2554ce506f806e126db22e38488d6
treedb3ce16a9e0d1b1ba4feba9c4d6724b5781a404d
parenta7533dbd90c821b2db04aa53168a4d0f4259ea6d
posixaio: fix thread problem with using errno

If we fail queueing a read or a write, use aio_error() to
retrieve the right error value. This fixes an issue on
(at least) Solaris where we get EAGAIN due to system
shortage of resources, but treat that as a random type
of error due to using errno.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/posixaio.c