Move td_* ddir defines
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index 5bd1baefc29849ec58c225e4443f8a829b95df5d..6ac8ef057b57ed9f98f35f8dfef5ace8a1af196e 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -37,6 +37,8 @@
 #include "fio.h"
 #include "hash.h"
 #include "smalloc.h"
+#include "verify.h"
+#include "diskutil.h"
 
 unsigned long page_mask;
 unsigned long page_size;
@@ -878,7 +880,6 @@ static void reset_io_counters(struct thread_data *td)
        td->zone_bytes = 0;
        td->rate_bytes = 0;
        td->rate_blocks = 0;
-       td->rw_end_set[0] = td->rw_end_set[1] = 0;
 
        td->last_was_sync = 0;
 
@@ -1063,21 +1064,11 @@ static void *thread_main(void *data)
                clear_state = 1;
 
                if (td_read(td) && td->io_bytes[DDIR_READ]) {
-                       if (td->rw_end_set[DDIR_READ])
-                               elapsed = utime_since(&td->start,
-                                                     &td->rw_end[DDIR_READ]);
-                       else
-                               elapsed = utime_since_now(&td->start);
-
+                       elapsed = utime_since_now(&td->start);
                        runtime[DDIR_READ] += elapsed;
                }
                if (td_write(td) && td->io_bytes[DDIR_WRITE]) {
-                       if (td->rw_end_set[DDIR_WRITE])
-                               elapsed = utime_since(&td->start,
-                                                     &td->rw_end[DDIR_WRITE]);
-                       else
-                               elapsed = utime_since_now(&td->start);
-
+                       elapsed = utime_since_now(&td->start);
                        runtime[DDIR_WRITE] += elapsed;
                }