- make allrandrepeat a synonym of randrepeat. allrandrepeat is
superfluous because the seeds set by randrepeat already encompass
random number generators beyond the one used for random offsets.
- allow randseed to override [all]randrepeat: this is what the
documentation implies but was not previously the case
This is a breaking change for users relying on the values of fio's
default random seeds.
Link: https://github.com/axboe/fio/pull/1546
Fixes: https://github.com/axboe/fio/issues/1502
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
o->do_disk_util = le32_to_cpu(top->do_disk_util);
o->override_sync = le32_to_cpu(top->override_sync);
o->rand_repeatable = le32_to_cpu(top->rand_repeatable);
- o->allrand_repeatable = le32_to_cpu(top->allrand_repeatable);
o->rand_seed = le64_to_cpu(top->rand_seed);
o->log_entries = le32_to_cpu(top->log_entries);
o->log_avg_msec = le32_to_cpu(top->log_avg_msec);
top->do_disk_util = cpu_to_le32(o->do_disk_util);
top->override_sync = cpu_to_le32(o->override_sync);
top->rand_repeatable = cpu_to_le32(o->rand_repeatable);
- top->allrand_repeatable = cpu_to_le32(o->allrand_repeatable);
top->rand_seed = __cpu_to_le64(o->rand_seed);
top->log_entries = cpu_to_le32(o->log_entries);
top->log_avg_msec = cpu_to_le32(o->log_avg_msec);
if (!td->o.rand_repeatable && !fio_option_is_set(&td->o, rand_seed)) {
int ret = init_random_seeds(td->rand_seeds, sizeof(td->rand_seeds));
+ dprint(FD_RANDOM, "using system RNG for random seeds\n");
if (ret)
return ret;
} else {
}
}
- if (td->o.allrand_repeatable) {
- unsigned int i;
-
- for (i = 0; i < FIO_RAND_NR_OFFS; i++)
- td->rand_seeds[i] = FIO_RANDSEED * td->thread_number + i;
- }
-
- if (td->o.rand_repeatable)
- td->rand_seeds[FIO_RAND_BLOCK_OFF] = FIO_RANDSEED * td->thread_number;
-
td_fill_rand_seeds(td);
dprint(FD_RANDOM, "FIO_RAND_NR_OFFS=%d\n", FIO_RAND_NR_OFFS);
},
{
.name = "randrepeat",
+ .alias = "allrandrepeat",
.lname = "Random repeatable",
.type = FIO_OPT_BOOL,
.off1 = offsetof(struct thread_options, rand_repeatable),
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_RANDOM,
},
- {
- .name = "allrandrepeat",
- .lname = "All Random Repeat",
- .type = FIO_OPT_BOOL,
- .off1 = offsetof(struct thread_options, allrand_repeatable),
- .help = "Use repeatable random numbers for everything",
- .def = "0",
- .category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_RANDOM,
- },
{
.name = "nrfiles",
.lname = "Number of files",
};
enum {
- FIO_SERVER_VER = 99,
+ FIO_SERVER_VER = 100,
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
FIO_SERVER_MAX_CMD_MB = 2048,
unsigned int do_disk_util;
unsigned int override_sync;
unsigned int rand_repeatable;
- unsigned int allrand_repeatable;
unsigned long long rand_seed;
unsigned int log_avg_msec;
unsigned int log_hist_msec;
uint32_t do_disk_util;
uint32_t override_sync;
uint32_t rand_repeatable;
- uint32_t allrand_repeatable;
- uint32_t pad2;
uint64_t rand_seed;
uint32_t log_avg_msec;
uint32_t log_hist_msec;