The index in the random seed array for generating offsets is
FIO_RAND_BLOCK_OFF. So this is the index that should be used to find the
random seed when fio generates offsets following the Zipf, Pareto, and
Gaussian distributions. The previous index 4 actually corresponds to
FIO_RAND_MIX_OFF.
This change means that the default sequences of non-uniform random
offsets generated before and after this patch will differ. So users
relying on the repeatability of I/O patterns will have new repeatable
patterns after this change.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
seed = jhash(f->file_name, strlen(f->file_name), 0) * td->thread_number;
if (!td->o.rand_repeatable)
- seed = td->rand_seeds[4];
+ seed = td->rand_seeds[FIO_RAND_BLOCK_OFF];
if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
zipf_init(&f->zipf, nranges, td->o.zipf_theta.u.f, td->o.random_center.u.f, seed);