Fix startdelay option with s/m/h/d postfix
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index f00f64a9dc4297217e870eae87b27b5980151719..e05d95a53175bb425f747891b0dfb707e015f1e7 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -31,6 +31,7 @@
 #include "helpers.h"
 #include "options.h"
 #include "profile.h"
+#include "time.h"
 
 #ifdef FIO_HAVE_GUASI
 #include <guasi.h>
@@ -79,6 +80,7 @@ struct thread_stat {
 
        struct io_log *slat_log;
        struct io_log *clat_log;
+       struct io_log *lat_log;
        struct io_log *bw_log;
 
        /*
@@ -86,6 +88,7 @@ struct thread_stat {
         */
        struct io_stat clat_stat[2];            /* completion latency */
        struct io_stat slat_stat[2];            /* submission latency */
+       struct io_stat lat_stat[2];             /* total latency */
        struct io_stat bw_stat[2];              /* bandwidth stats */
 
        unsigned long long stat_io_bytes[2];
@@ -184,6 +187,8 @@ struct thread_options {
        unsigned int verify_pattern_bytes;
        unsigned int verify_fatal;
        unsigned int verify_async;
+       unsigned long long verify_backlog;
+       unsigned int verify_batch;
        unsigned int use_thread;
        unsigned int unlink;
        unsigned int do_disk_util;
@@ -203,7 +208,7 @@ struct thread_options {
        unsigned int thinktime_blocks;
        unsigned int fsync_blocks;
        unsigned int fdatasync_blocks;
-       unsigned int start_delay;
+       unsigned long start_delay;
        unsigned long long timeout;
        unsigned long long ramp_time;
        unsigned int overwrite;
@@ -232,12 +237,14 @@ struct thread_options {
        unsigned int zero_buffers;
        unsigned int refill_buffers;
        unsigned int time_based;
+       unsigned int disable_lat;
        unsigned int disable_clat;
        unsigned int disable_slat;
        unsigned int disable_bw;
        unsigned int gtod_reduce;
        unsigned int gtod_cpu;
        unsigned int gtod_offload;
+       enum fio_cs clocksource;
 
        char *read_iolog_file;
        char *write_iolog_file;
@@ -279,9 +286,12 @@ struct thread_options {
         */
        char *cgroup;
        unsigned int cgroup_weight;
+       unsigned int cgroup_nodelete;
 
        unsigned int uid;
        unsigned int gid;
+
+       unsigned int sync_file_range;
 };
 
 #define FIO_VERROR_SIZE        128
@@ -316,6 +326,7 @@ struct thread_data {
        unsigned int ioprio;
        unsigned int ioprio_set;
        unsigned int last_was_sync;
+       enum fio_ddir last_ddir;
 
        char *mmapfile;
        int mmapfd;
@@ -330,6 +341,8 @@ struct thread_data {
        os_random_state_t bsrange_state;
        os_random_state_t verify_state;
 
+       unsigned int verify_batch;
+
        int shm_id;
 
        /*
@@ -368,6 +381,7 @@ struct thread_data {
        struct timeval lastrate[2];
 
        unsigned long long total_io_size;
+       unsigned long long fill_device_size;
 
        unsigned long io_issues[2];
        unsigned long long io_blocks[2];
@@ -404,6 +418,7 @@ struct thread_data {
         */
        struct rb_root io_hist_tree;
        struct flist_head io_hist_list;
+       unsigned long io_hist_len;
 
        /*
         * For IO replaying
@@ -417,6 +432,8 @@ struct thread_data {
        unsigned int file_service_left;
        struct fio_file *file_service_file;
 
+       unsigned int sync_file_range_nr;
+
        /*
         * For generating file sizes
         */
@@ -477,6 +494,7 @@ extern unsigned long done_secs;
 extern char *job_section;
 extern int fio_gtod_offload;
 extern int fio_gtod_cpu;
+extern enum fio_cs fio_clock_source;
 
 extern struct thread_data *threads;
 
@@ -513,25 +531,6 @@ static inline int should_fsync(struct thread_data *td)
        return 0;
 }
 
-/*
- * Time functions
- */
-extern unsigned long long utime_since(struct timeval *, struct timeval *);
-extern unsigned long long utime_since_now(struct timeval *);
-extern unsigned long mtime_since(struct timeval *, struct timeval *);
-extern unsigned long mtime_since_now(struct timeval *);
-extern unsigned long time_since_now(struct timeval *);
-extern unsigned long mtime_since_genesis(void);
-extern void usec_spin(unsigned int);
-extern void usec_sleep(struct thread_data *, unsigned long);
-extern void fill_start_time(struct timeval *);
-extern void fio_gettime(struct timeval *, void *);
-extern void fio_gtod_init(void);
-extern void fio_gtod_update(void);
-extern void set_genesis_time(void);
-extern int ramp_time_over(struct thread_data *);
-extern int in_ramp_time(struct thread_data *);
-
 /*
  * Init/option functions
  */