Add option to select how to service multiple files
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 959e52f3d032f332a3f67f22287228fdac7b68fa..8c46b3f905b2d9eb5b320ca96d05e2b8117b8e8d 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -280,7 +280,10 @@ struct thread_data {
        struct fio_file *files;
        unsigned int nr_files;
        unsigned int nr_uniq_files;
-       unsigned int next_file;
+       union {
+               unsigned int next_file;
+               os_random_state_t next_file_state;
+       };
        int error;
        pid_t pid;
        char *orig_buffer;
@@ -340,6 +343,7 @@ struct thread_data {
        unsigned int rwmixread;
        unsigned int rwmixwrite;
        unsigned int nice;
+       unsigned int file_service_type;
 
        char *read_iolog_file;
        char *write_iolog_file;
@@ -436,6 +440,14 @@ struct thread_data {
        struct itimerval timer;
 };
 
+/*
+ * roundrobin available files, or choose one at random.
+ */
+enum {
+       FIO_FSERVICE_RANDOM     = 1,
+       FIO_FSERVICE_RR         = 2,
+};
+
 /*
  * 30 second per-io_u timeout, with 5 second intervals to avoid resetting
  * the timer on each queue operation.