From: Jens Axboe Date: Mon, 28 Mar 2011 07:37:41 +0000 (+0200) Subject: Switch the latter part of the offset generation to __rand() too X-Git-Tag: fio-1.52~7 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d1cea5214a367659a1b10e0886c5f2e21e24e18f Switch the latter part of the offset generation to __rand() too Signed-off-by: Jens Axboe --- 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); /*