X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=ioengines.c;h=2969840706d18f75965c083c574531d9ff2fa7e0;hb=df9c26b10275a631e83e7cc92d5f7384998b2c49;hp=3ef0d032938a11062ba513fe5154ba9b6b04d678;hpb=62977e09a378a713b31d64c63e15adcf9f6f9d9d;p=fio.git diff --git a/ioengines.c b/ioengines.c index 3ef0d032..29698407 100644 --- a/ioengines.c +++ b/ioengines.c @@ -226,7 +226,8 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) io_u->resid = 0; if (td->io_ops->flags & FIO_SYNCIO) { - fio_gettime(&io_u->issue_time, NULL); + if (fio_fill_issue_time(td)) + fio_gettime(&io_u->issue_time, NULL); /* * only used for iolog @@ -269,7 +270,8 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) } if ((td->io_ops->flags & FIO_SYNCIO) == 0) { - fio_gettime(&io_u->issue_time, NULL); + if (fio_fill_issue_time(td)) + fio_gettime(&io_u->issue_time, NULL); /* * only used for iolog @@ -403,3 +405,11 @@ int td_io_close_file(struct thread_data *td, struct fio_file *f) return put_file(td, f); } + +int td_io_get_file_size(struct thread_data *td, struct fio_file *f) +{ + if (!td->io_ops->get_file_size) + return 0; + + return td->io_ops->get_file_size(td, f); +}