libaio engine: queue init error handling
authorJens Axboe <jens.axboe@oracle.com>
Tue, 20 Mar 2007 09:42:07 +0000 (10:42 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 20 Mar 2007 09:42:07 +0000 (10:42 +0100)
It fails for repeated large io depths, so make sure we retrieve the
error and log it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/libaio.c

index 895b914cf7e044c2bd8ba828035cc3aa8700e391..7c44927a3b8b5a3ac39b37b4eb43ed6760582d87 100644 (file)
@@ -190,10 +190,13 @@ static void fio_libaio_cleanup(struct thread_data *td)
 static int fio_libaio_init(struct thread_data *td)
 {
        struct libaio_data *ld = malloc(sizeof(*ld));
+       int err;
 
        memset(ld, 0, sizeof(*ld));
-       if (io_queue_init(td->o.iodepth, &ld->aio_ctx)) {
-               td_verror(td, errno, "io_queue_init");
+
+       err = io_queue_init(td->o.iodepth, &ld->aio_ctx);
+       if (err) {
+               td_verror(td, -err, "io_queue_init");
                free(ld);
                return 1;
        }