From fd9882facefa0f5b09c09d2bc5cb3a2b6eabda1a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 6 Dec 2019 22:03:04 -0700 Subject: [PATCH] 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 --- filesetup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.25.1