pre_read fixes
[fio.git] / ioengines.c
index 3ef0d032938a11062ba513fe5154ba9b6b04d678..2969840706d18f75965c083c574531d9ff2fa7e0 100644 (file)
@@ -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);
+}