Reseed random generator for loop/time based runs
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index b6ffe60b900cfa0f391d9e6c030e3e217f152817..ff0068ca17290450307602f6b44585cab71b3e36 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -429,6 +429,7 @@ struct thread_options {
        unsigned long long start_offset;
 
        unsigned int bs[2];
+       unsigned int ba[2];
        unsigned int min_bs[2];
        unsigned int max_bs[2];
        struct bssplit *bssplit;
@@ -571,6 +572,8 @@ struct thread_data {
 
        char *sysfs_root;
 
+       unsigned long rand_seeds[6];
+
        os_random_state_t bsrange_state;
        os_random_state_t verify_state;
 
@@ -853,6 +856,7 @@ extern int fio_show_option_help(const char *);
 extern void fio_options_dup_and_init(struct option *);
 extern void options_mem_dupe(struct thread_data *);
 extern void options_mem_free(struct thread_data *);
+extern void td_fill_rand_seeds(struct thread_data *);
 #define FIO_GETOPT_JOB         0x89988998
 #define FIO_NR_OPTIONS         128
 
@@ -1032,6 +1036,8 @@ static inline void fio_file_reset(struct fio_file *f)
 {
        f->last_free_lookup = 0;
        f->last_pos = f->file_offset;
+       if (f->file_map)
+               memset(f->file_map, 0, f->num_maps * sizeof(int));
 }
 
 static inline void clear_error(struct thread_data *td)