Fix bug in parser that causes a crash with a bad option
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 690afad607b9d0b39c1d69153063d4d99ad10f0e..3e39aeae315b5f05831cd13fedefd0f26b790b02 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -499,6 +499,7 @@ struct thread_options {
        unsigned int disable_clat;
        unsigned int disable_slat;
        unsigned int disable_bw;
+       unsigned int gtod_reduce;
 
        char *read_iolog_file;
        char *write_iolog_file;
@@ -612,6 +613,9 @@ struct thread_data {
        struct timeval epoch;   /* time job was started */
        struct timeval rw_end[2];
        struct timeval last_issue;
+       struct timeval tv_cache;
+       unsigned int tv_cache_nr;
+       unsigned int tv_cache_mask;
        unsigned int rw_end_set[2];
        unsigned int ramp_time_over;
 
@@ -1040,4 +1044,13 @@ static inline void dprint_io_u(struct io_u *io_u, const char *p)
 #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