client: parse env variables before sending job-file contents to server
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index b9a21782c7611c0756448c5fbf0a9e6c5382fa01..9727f6c65556c4f937adad573cc2429a02ce6aa2 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -44,7 +44,7 @@
 #include "io_u_queue.h"
 #include "workqueue.h"
 #include "steadystate.h"
-#include "nowarn_snprintf.h"
+#include "lib/nowarn_snprintf.h"
 
 #ifdef CONFIG_SOLARISAIO
 #include <sys/asynch.h>
@@ -567,6 +567,7 @@ extern void fio_fill_default_options(struct thread_data *);
 extern int fio_show_option_help(const char *);
 extern void fio_options_set_ioengine_opts(struct option *long_options, struct thread_data *td);
 extern void fio_options_dup_and_init(struct option *);
+extern char *fio_option_dup_subs(const char *);
 extern void fio_options_mem_dupe(struct thread_data *);
 extern void td_fill_rand_seeds(struct thread_data *);
 extern void td_fill_verify_state_seed(struct thread_data *);
@@ -721,22 +722,17 @@ static inline bool option_check_rate(struct thread_data *td, enum fio_ddir ddir)
        return false;
 }
 
-static inline bool __should_check_rate(struct thread_data *td,
-                                      enum fio_ddir ddir)
+static inline bool __should_check_rate(struct thread_data *td)
 {
        return (td->flags & TD_F_CHECK_RATE) != 0;
 }
 
 static inline bool should_check_rate(struct thread_data *td)
 {
-       if (__should_check_rate(td, DDIR_READ) && td->bytes_done[DDIR_READ])
-               return true;
-       if (__should_check_rate(td, DDIR_WRITE) && td->bytes_done[DDIR_WRITE])
-               return true;
-       if (__should_check_rate(td, DDIR_TRIM) && td->bytes_done[DDIR_TRIM])
-               return true;
+       if (!__should_check_rate(td))
+               return false;
 
-       return false;
+       return ddir_rw_sum(td->bytes_done) != 0;
 }
 
 static inline unsigned int td_max_bs(struct thread_data *td)