init: add semantics for all types of backends running
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 3ac552b29da8814baa509dce69fa00b7e879eee1..83654bbbf0411d4c944b85a8e01a915d65605661 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -399,6 +399,11 @@ struct thread_data {
         * For IO replaying
         */
        struct flist_head io_log_list;
+       FILE *io_log_rfile;
+       unsigned int io_log_current;
+       unsigned int io_log_checkmark;
+       unsigned int io_log_highmark;
+       struct timespec io_log_highmark_time;
 
        /*
         * For tracking/handling discards
@@ -517,6 +522,7 @@ extern int fio_clock_source_set;
 extern int warnings_fatal;
 extern int terse_version;
 extern int is_backend;
+extern int is_local_backend;
 extern int nr_clients;
 extern int log_syslog;
 extern int status_interval;
@@ -529,6 +535,11 @@ extern char *aux_path;
 
 extern struct thread_data *threads;
 
+static inline bool is_running_backend(void)
+{
+       return is_backend || is_local_backend;
+}
+
 extern bool eta_time_within_slack(unsigned int time);
 
 static inline void fio_ro_check(const struct thread_data *td, struct io_u *io_u)
@@ -736,17 +747,17 @@ static inline bool should_check_rate(struct thread_data *td)
        return ddir_rw_sum(td->bytes_done) != 0;
 }
 
-static inline unsigned int td_max_bs(struct thread_data *td)
+static inline unsigned long long td_max_bs(struct thread_data *td)
 {
-       unsigned int max_bs;
+       unsigned long long max_bs;
 
        max_bs = max(td->o.max_bs[DDIR_READ], td->o.max_bs[DDIR_WRITE]);
        return max(td->o.max_bs[DDIR_TRIM], max_bs);
 }
 
-static inline unsigned int td_min_bs(struct thread_data *td)
+static inline unsigned long long td_min_bs(struct thread_data *td)
 {
-       unsigned int min_bs;
+       unsigned long long min_bs;
 
        min_bs = min(td->o.min_bs[DDIR_READ], td->o.min_bs[DDIR_WRITE]);
        return min(td->o.min_bs[DDIR_TRIM], min_bs);