X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=c672993414b480d33e5e4224ab84e727249e81e6;hp=e9ce37ef6804670371d86e4833181c6cbc6abc64;hb=d1cea5214a367659a1b10e0886c5f2e21e24e18f;hpb=2615cc4b28e7d0e436a625dff92e6a71ccc6c49b 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); /*