init: refactor random seed setting
authorVincent Fu <vincent.fu@samsung.com>
Fri, 24 Mar 2023 17:47:14 +0000 (17:47 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 13 Apr 2023 17:33:00 +0000 (13:33 -0400)
commitab3c4e7868980f91439a1fe888b0f13b27f3cd42
treeed2c5c8008947b7d79db2d53ed130f9be697f7c7
parent64b2ba1460687332817655ede202166386af938b
init: refactor random seed setting

td->rand_seed was modified in three different places. Put all this code
in setup_random_seeds() to make it easier to understand and more
maintanable. Also put setup_random_seeds() next to the other
random-seed-related functions in init.c.

init_rand_seed() was called in three different places for fio's main random
number generators. Also put these three sets of invocations in the same
place.

Always initialize all of fio's main set of random states instead of
skipping some for sequential workloads. This makes debugging easier.

No functional change.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
fio.h
init.c