From d1cea5214a367659a1b10e0886c5f2e21e24e18f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 28 Mar 2011 09:37:41 +0200 Subject: [PATCH] Switch the latter part of the offset generation to __rand() too Signed-off-by: Jens Axboe --- io_u.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/io_u.c b/io_u.c index e9ce37ef..c6729934 100644 --- a/io_u.c +++ b/io_u.c @@ -210,7 +210,10 @@ static int get_next_rand_offset(struct thread_data *td, struct fio_file *f, if (!get_next_free_block(td, f, ddir, b)) goto ret; - r = os_random_long(&td->random_state); + if (td->o.use_os_rand) + r = os_random_long(&td->random_state); + else + r = __rand(&td->__random_state); } while (--loops); /* -- 2.25.1