fio: allow general repeatability
[fio.git] / init.c
diff --git a/init.c b/init.c
index 469e73dc433c4b9a020d6fb1bc5d2c17aa98960f..c3b33dccfaca2d538b39470532bc302be1544e5b 100644 (file)
--- a/init.c
+++ b/init.c
@@ -751,6 +751,12 @@ static void td_fill_rand_seeds_internal(struct thread_data *td)
 
 void td_fill_rand_seeds(struct thread_data *td)
 {
+       if (td->o.allrand_repeatable) {
+               for (int i = 0; i < FIO_RAND_NR_OFFS; i++)
+                       td->rand_seeds[i] = FIO_RANDSEED * td->thread_number
+                               + i;
+       }
+
        if (td->o.use_os_rand)
                td_fill_rand_seeds_os(td);
        else