X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=5a321653418b97a467fb833107e7e3d120177321;hp=abc385303d86c466ba34ed261a5624e2546e03de;hb=10ba535a5cbb95b5576e33a6f8af093a6ca3bfd7;hpb=84585003d025a38b91749cb0d68f6b5653d1f1a3 diff --git a/ioengines.c b/ioengines.c index abc38530..5a321653 100644 --- a/ioengines.c +++ b/ioengines.c @@ -69,3 +69,32 @@ void close_ioengine(struct thread_data *td) free(td->io_ops); td->io_ops = NULL; } + +int td_io_prep(struct thread_data *td, struct io_u *io_u) +{ + if (td->io_ops->prep && td->io_ops->prep(td, io_u)) + return 1; + + return 0; +} + +int td_io_sync(struct thread_data *td, struct fio_file *f) +{ + if (td->io_ops->sync) + return td->io_ops->sync(td, f); + + return 0; +} + +int td_io_getevents(struct thread_data *td, int min, int max, + struct timespec *t) +{ + return td->io_ops->getevents(td, min, max, t); +} + +int td_io_queue(struct thread_data *td, struct io_u *io_u) +{ + gettimeofday(&io_u->issue_time, NULL); + + return td->io_ops->queue(td, io_u); +}