#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)