[PATCH] Fix random seed for numjobs > 1
If you had numjobs larger than 1, then each shared job would get the
same random seed, resulting in the exact same io pattern. Multiply
the seed with the thread number, that will still get repeatable
patterns but only per-thread/process.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index 9e41d55..1dec2bb 100644
--- a/init.c
+++ b/init.c
@@ -845,7 +845,7 @@
return 0;
if (td->rand_repeatable)
- seeds[3] = FIO_RANDSEED;
+ seeds[3] = FIO_RANDSEED * td->thread_number;
if (!td->norandommap) {
for_each_file(td, f, i) {