#ifdef FIO_HAVE_LIBAIO
-#define ev_to_iou(ev) (struct io_u *) ((unsigned long) (ev)->obj)
-
struct libaio_data {
io_context_t aio_ctx;
struct io_event *aio_events;
struct io_u *io_u;
ev = ld->aio_events + event;
- io_u = ev_to_iou(ev);
+ io_u = container_of(ev->obj, struct io_u, iocb);
if (ev->res != io_u->xfer_buflen) {
if (ev->res > io_u->xfer_buflen)
* and we need the right depth.
*/
if (!o->userspace_reap)
- err = io_queue_init(0, &ld->aio_ctx);
+ err = io_queue_init(INT_MAX, &ld->aio_ctx);
if (o->userspace_reap || err == -EINVAL)
err = io_queue_init(td->o.iodepth, &ld->aio_ctx);
if (err) {