[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/fio.c b/fio.c
index 53735c6..8571e65 100644
--- a/fio.c
+++ b/fio.c
@@ -218,14 +218,14 @@
ret = td_io_queue(td, io_u);
if (ret) {
+ td_verror(td, io_u->error);
put_io_u(td, io_u);
- td_verror(td, ret);
return 1;
}
ret = td_io_getevents(td, 1, td->cur_depth, NULL);
if (ret < 0) {
- td_verror(td, -ret);
+ td_verror(td, ret);
return 1;
}
@@ -292,8 +292,8 @@
ret = td_io_queue(td, io_u);
if (ret) {
+ td_verror(td, io_u->error);
put_io_u(td, io_u);
- td_verror(td, ret);
break;
}
@@ -399,8 +399,8 @@
ret = td_io_queue(td, io_u);
if (ret) {
+ td_verror(td, io_u->error);
put_io_u(td, io_u);
- td_verror(td, ret);
break;
}