[PATCH] Various little fixes and lots of commenting
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 671cb22f88609da3aed675be5c818b2de51ee101..cc30a15ea189b2bad02a2c64ce5a5af5a3dd85ca 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -169,6 +169,7 @@ struct thread_data {
        unsigned char use_thread;
        unsigned char do_disk_util;
        unsigned char override_sync;
+       unsigned char rand_repeatable;
 
        unsigned int bs;
        unsigned int min_bs;
@@ -176,7 +177,7 @@ struct thread_data {
        unsigned int thinktime;
        unsigned int fsync_blocks;
        unsigned int start_delay;
-       unsigned int timeout;
+       unsigned long timeout;
        enum fio_iotype io_engine;
        unsigned int overwrite;
        unsigned int bw_avg_time;
@@ -191,7 +192,6 @@ struct thread_data {
        unsigned int numjobs;
        unsigned int iodepth;
        os_cpu_mask_t cpumask;
-       unsigned int jobnum;
        unsigned int iolog;
        unsigned int read_iolog;
        unsigned int write_iolog;
@@ -324,6 +324,9 @@ extern int exitall_on_terminate;
 extern int thread_number;
 extern int shm_id;
 extern int groupid;
+extern int terse_output;
+extern FILE *f_out;
+extern FILE *f_err;
 
 extern struct thread_data *threads;
 
@@ -439,4 +442,13 @@ static inline void fio_sem_up(volatile int volatile *sem)
        (*sem)++;
 }
 
+/*
+ * If logging output to a file, stderr should go to both stderr and f_err
+ */
+#define log_err(args...)       do {            \
+       fprintf(f_err, ##args);                 \
+       if (f_err != stderr)                    \
+               fprintf(stderr, ##args);        \
+       } while (0)
+
 #endif