#include <assert.h>
#include "../fio.h"
-#include "../os.h"
#ifdef FIO_HAVE_POSIXAIO
struct aiocb *aiocb = &io_u->aiocb;
int ret;
+ fio_ro_check(td, io_u);
+
if (io_u->ddir == DDIR_READ)
ret = aio_read(aiocb);
else if (io_u->ddir == DDIR_WRITE)
struct posixaio_data *pd = malloc(sizeof(*pd));
memset(pd, 0, sizeof(*pd));
- pd->aio_events = malloc(td->iodepth * sizeof(struct io_u *));
- memset(pd->aio_events, 0, td->iodepth * sizeof(struct io_u *));
+ pd->aio_events = malloc(td->o.iodepth * sizeof(struct io_u *));
+ memset(pd->aio_events, 0, td->o.iodepth * sizeof(struct io_u *));
td->io_ops->data = pd;
return 0;