Issue time fixup for guasi/libaio
authorJens Axboe <jens.axboe@oracle.com>
Thu, 16 Oct 2008 19:26:10 +0000 (21:26 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 16 Oct 2008 19:26:10 +0000 (21:26 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/guasi.c
engines/libaio.c
fio.h
ioengines.c

index a7589dc8a9a0743971417f09dad7d8055f1bd0a7..4ae014307bd88cfcd1d1c9df763fd4d34d08a568 100644 (file)
@@ -141,6 +141,9 @@ static void fio_guasi_queued(struct thread_data *td, struct io_u **io_us, int nr
        struct io_u *io_u;
        struct timeval now;
 
        struct io_u *io_u;
        struct timeval now;
 
+       if (!fio_fill_issue_time(td))
+               return;
+
        io_u_mark_submit(td, nr);
        fio_gettime(&now, NULL);
        for (i = 0; i < nr; i++) {
        io_u_mark_submit(td, nr);
        fio_gettime(&now, NULL);
        for (i = 0; i < nr; i++) {
index e6b926c35a53aa9ccf7e6e31e8d66c982fbaebb0..18dcf9ddfad59d753a2cf4b71061065dc6baf6fc 100644 (file)
@@ -118,6 +118,9 @@ static void fio_libaio_queued(struct thread_data *td, struct io_u **io_us,
        struct timeval now;
        unsigned int i;
 
        struct timeval now;
        unsigned int i;
 
+       if (!fio_fill_issue_time(td))
+               return;
+
        fio_gettime(&now, NULL);
 
        for (i = 0; i < nr; i++) {
        fio_gettime(&now, NULL);
 
        for (i = 0; i < nr; i++) {
diff --git a/fio.h b/fio.h
index 690afad607b9d0b39c1d69153063d4d99ad10f0e..ed1257cc35bfb46d94bb8b4458da2f4e1f339ed9 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -1040,4 +1040,13 @@ static inline void dprint_io_u(struct io_u *io_u, const char *p)
 #define dprint_io_u(io_u, p)
 #endif
 
 #define dprint_io_u(io_u, p)
 #endif
 
+static inline int fio_fill_issue_time(struct thread_data *td)
+{
+       if (td->o.read_iolog_file ||
+           !td->o.disable_clat || !td->o.disable_slat || !td->o.disable_bw)
+               return 1;
+
+       return 0;
+}
+
 #endif
 #endif
index 9daeaab0bb6b599291f2dd1c24163323405cb501..8073d1b74dc8ca0a815b1dc4577953b39a804506 100644 (file)
@@ -210,15 +210,6 @@ out:
        return r;
 }
 
        return r;
 }
 
-static inline int get_issue_time(struct thread_data *td)
-{
-       if (td->o.read_iolog_file ||
-           !td->o.disable_clat || !td->o.disable_slat || !td->o.disable_bw)
-               return 1;
-
-       return 0;
-}
-
 int td_io_queue(struct thread_data *td, struct io_u *io_u)
 {
        int ret;
 int td_io_queue(struct thread_data *td, struct io_u *io_u)
 {
        int ret;
@@ -235,7 +226,7 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u)
        io_u->resid = 0;
 
        if (td->io_ops->flags & FIO_SYNCIO) {
        io_u->resid = 0;
 
        if (td->io_ops->flags & FIO_SYNCIO) {
-               if (get_issue_time(td))
+               if (fio_fill_issue_time(td))
                        fio_gettime(&io_u->issue_time, NULL);
 
                /*
                        fio_gettime(&io_u->issue_time, NULL);
 
                /*
@@ -279,7 +270,7 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u)
        }
 
        if ((td->io_ops->flags & FIO_SYNCIO) == 0) {
        }
 
        if ((td->io_ops->flags & FIO_SYNCIO) == 0) {
-               if (get_issue_time(td))
+               if (fio_fill_issue_time(td))
                        fio_gettime(&io_u->issue_time, NULL);
 
                /*
                        fio_gettime(&io_u->issue_time, NULL);
 
                /*