summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-12-06 22:03:04 -0700
committerJens Axboe <axboe@kernel.dk>2019-12-06 22:03:04 -0700
commitfd9882facefa0f5b09c09d2bc5cb3a2b6eabda1a (patch)
tree8ecb41265c738b8f810c963b16725ba0fa923944
parent8beee62d341fdc028c8404466597e6951c543ea1 (diff)
downloadfio-fd9882facefa0f5b09c09d2bc5cb3a2b6eabda1a.tar.gz
fio-fd9882facefa0f5b09c09d2bc5cb3a2b6eabda1a.tar.bz2
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 <axboe@kernel.dk>
-rw-r--r--filesetup.c4
1 files changed, 3 insertions, 1 deletions
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);