X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fposixaio.c;h=65a88e90756ceeb6b8640a99aff46d752abd0a80;hp=88dc0e90a654f2d49f372194a3caf6fe575684de;hb=e7d2e61694c62b90a2fb84c012b4edcc1973d72c;hpb=808a63b8d2d5f6d3a4ec83e718495f09588aef7e diff --git a/engines/posixaio.c b/engines/posixaio.c index 88dc0e90..65a88e90 100644 --- a/engines/posixaio.c +++ b/engines/posixaio.c @@ -11,7 +11,6 @@ #include #include "../fio.h" -#include "../os.h" #ifdef FIO_HAVE_POSIXAIO @@ -77,8 +76,8 @@ static int fio_posixaio_prep(struct thread_data fio_unused *td, return 0; } -static int fio_posixaio_getevents(struct thread_data *td, int min, int max, - struct timespec *t) +static int fio_posixaio_getevents(struct thread_data *td, unsigned int min, + unsigned int max, struct timespec *t) { struct posixaio_data *pd = td->io_ops->data; struct list_head *entry; @@ -149,6 +148,8 @@ static int fio_posixaio_queue(struct thread_data fio_unused *td, 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) @@ -181,8 +182,8 @@ static int fio_posixaio_init(struct thread_data *td) 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;