X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=feb986a844bba2342c5844094bacc89f6ed26821;hp=34ae91671a4348c43bacdf9f7eddc2f5e81f020d;hb=b3f378e90231ecb2082ec565bafb3f721c4f1902;hpb=661598287ecc3b8987f312cf8403936552ce686a diff --git a/ioengines.c b/ioengines.c index 34ae9167..feb986a8 100644 --- a/ioengines.c +++ b/ioengines.c @@ -192,6 +192,7 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) if (td->io_ops->flags & FIO_SYNCIO) { fio_gettime(&io_u->issue_time, NULL); + memcpy(&td->last_issue, &io_u->issue_time, sizeof(struct timeval)); /* * for a sync engine, set the timeout upfront @@ -207,9 +208,6 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) ret = td->io_ops->queue(td, io_u); - if (ret == FIO_Q_QUEUED || ret == FIO_Q_COMPLETED) - get_file(io_u->file); - if (ret == FIO_Q_QUEUED) { int r; @@ -223,6 +221,7 @@ 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); + memcpy(&td->last_issue, &io_u->issue_time, sizeof(struct timeval)); /* * async engine, set the timeout here