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 *
unsigned int i, nr_blocks = io_u->buflen / 512;
uint64_t boffset;
unsigned int offset;
- void *p, *end;
+ char *p, *end;
if (!nr_blocks)
return;