[PATCH] ->queue() error handling
We return 1/0 for failure/success and put the error in io_u->error.
The libaio engine didn't quite do that.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/engines/fio-engine-libaio.c b/engines/fio-engine-libaio.c
index 5e394e3..daee659 100644
--- a/engines/fio-engine-libaio.c
+++ b/engines/fio-engine-libaio.c
@@ -78,9 +78,13 @@
break;
} while (1);
- assert(ret);
+ if (ret <= 0) {
+ io_u->resid = io_u->buflen;
+ io_u->error = -ret;
+ return 1;
+ }
- return (int) -ret;
+ return 0;
}
static int fio_libaio_cancel(struct thread_data *td, struct io_u *io_u)