filesetup: use correct random seed for non-uniform distributions
authorVincent Fu <vincent.fu@samsung.com>
Wed, 3 Aug 2022 19:21:11 +0000 (12:21 -0700)
committerVincent Fu <vincentfu@gmail.com>
Wed, 3 Aug 2022 20:18:53 +0000 (16:18 -0400)
commitc08f9533042e909d4b4b12fdb8d14f1bc8e23dff
tree75aff9ad7e55bc2bdc87310ecb09387700953b22
parent56b6bc259faf70fa5b9ef9de41909df9f91e72c6
filesetup: use correct random seed for non-uniform distributions

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>
filesetup.c