Add environment-variable substitution to config options
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index a0c1109ab97a8a9d4bb96c8ad9910408a9615266..63cd83f5e1be23d4548739a682947667f131533e 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -753,6 +753,10 @@ struct disk_util_stat {
  */
 struct disk_util {
        struct flist_head list;
+       /* If this disk is a slave, hook it into the master's
+        * list using this head.
+        */
+       struct flist_head slavelist;
 
        char *name;
        char *sysfs_root;
@@ -762,6 +766,15 @@ struct disk_util {
        struct disk_util_stat dus;
        struct disk_util_stat last_dus;
 
+       /* For software raids, this entry maintains pointers to the
+        * entries for the slave devices. The disk_util entries for
+        * the slaves devices should primarily be maintained through
+        * the disk_list list, i.e. for memory allocation and
+        * de-allocation, etc. Whereas this list should be used only
+        * for aggregating a software RAID's disk util figures.
+        */
+       struct flist_head slaves;
+
        unsigned long msec;
        struct timeval time;
 };
@@ -820,6 +833,7 @@ extern void fill_start_time(struct timeval *);
 extern void fio_gettime(struct timeval *, 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
@@ -886,6 +900,7 @@ enum {
        TD_NOT_CREATED = 0,
        TD_CREATED,
        TD_INITIALIZED,
+       TD_RAMP,
        TD_RUNNING,
        TD_VERIFYING,
        TD_FSYNCING,
@@ -893,6 +908,8 @@ enum {
        TD_REAPED,
 };
 
+extern void td_set_runstate(struct thread_data *, int);
+
 /*
  * Verify helpers
  */
@@ -927,6 +944,11 @@ extern void io_u_fill_buffer(struct thread_data *td, struct io_u *, unsigned int
 void io_u_mark_complete(struct thread_data *, unsigned int);
 void io_u_mark_submit(struct thread_data *, unsigned int);
 
+/*
+ * Reset stats after ramp time completes
+ */
+extern void reset_all_stats(struct thread_data *);
+
 /*
  * io engine entry points
  */