From: Jens Axboe Date: Sat, 7 Dec 2019 05:03:04 +0000 (-0700) Subject: filesetup: ensure to setup random generator properly X-Git-Tag: fio-3.17~11 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=fd9882facefa0f5b09c09d2bc5cb3a2b6eabda1a;p=fio.git filesetup: ensure to setup random generator properly If we have ZONED or ZONED_ABS set, we need to go through the same path as RANDOM. If not, we fail miserably later. Fixes: https://github.com/axboe/fio/issues/873 Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index 7fe2ebd4..ed3646a4 100644 --- a/filesetup.c +++ b/filesetup.c @@ -1287,7 +1287,9 @@ static bool init_rand_distribution(struct thread_data *td) unsigned int i; int state; - if (td->o.random_distribution == FIO_RAND_DIST_RANDOM) + if (td->o.random_distribution == FIO_RAND_DIST_RANDOM || + td->o.random_distribution == FIO_RAND_DIST_ZONED || + td->o.random_distribution == FIO_RAND_DIST_ZONED_ABS) return false; state = td_bump_runstate(td, TD_SETTING_UP);