X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=ed8e84aba41f2a5c48e7d2cc66c79efd849a5c75;hp=8d42d6541f7dbb9592639619874295153101bd91;hb=2f282cecc27c58ed3aa1204f5bda98433502d7ff;hpb=f25f4ef6d123173d7669553ec712419f95c1a3ea diff --git a/io_u.c b/io_u.c index 8d42d654..ed8e84ab 100644 --- a/io_u.c +++ b/io_u.c @@ -552,9 +552,9 @@ static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u, if (!io_u_fits(td, io_u, minbs)) return 0; - frand_max = rand_max(&td->bsrange_state); + frand_max = rand_max(&td->bsrange_state[ddir]); do { - r = __rand(&td->bsrange_state); + r = __rand(&td->bsrange_state[ddir]); if (!td->o.bssplit_nr[ddir]) { buflen = 1 + (unsigned int) ((double) maxbs *