X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=io_u.c;h=5221a78c264981c8071f58c0310fa37fdeba4927;hb=c7b42e0a8c3d6fb179cc7c681fcee58623de8b2f;hp=9e9dad5a79f15c6f405b26ad16736388149d257c;hpb=04bc85a130c5dbe25dafe5fa5084c5bdcf63844a;p=fio.git diff --git a/io_u.c b/io_u.c index 9e9dad5a..5221a78c 100644 --- a/io_u.c +++ b/io_u.c @@ -541,10 +541,8 @@ static unsigned int get_next_buflen(struct thread_data *td, struct io_u *io_u, r = __rand(&td->bsrange_state[ddir]); if (!td->o.bssplit_nr[ddir]) { - buflen = 1 + (unsigned int) ((double) maxbs * + buflen = minbs + (unsigned int) ((double) maxbs * (r / (frand_max + 1.0))); - if (buflen < minbs) - buflen = minbs; } else { long long perc = 0; unsigned int i;