/*
* Generate a value, v, between 1 and 100, both inclusive
*/
- v = rand32_between(&td->zone_state, 1, 100);
+ v = rand_between(&td->zone_state, 1, 100);
/*
* Find our generated table. 'send' is the end block of this zone,
/*
* Generate a value, v, between 1 and 100, both inclusive
*/
- v = rand32_between(&td->zone_state, 1, 100);
+ v = rand_between(&td->zone_state, 1, 100);
zsi = &td->zone_state_index[ddir][v - 1];
stotal = zsi->size_perc_prev;
if (td->o.perc_rand[ddir] == 100)
return true;
- v = rand32_between(&td->seq_rand_state[ddir], 1, 100);
+ v = rand_between(&td->seq_rand_state[ddir], 1, 100);
return v <= td->o.perc_rand[ddir];
}
if (td->o.time_based ||
(td->o.file_service_type & __FIO_FSERVICE_NONUNIFORM)) {
fio_file_reset(td, f);
+ loop_cache_invalidate(td, f);
if (!get_next_rand_offset(td, f, ddir, b))
return 0;
- loop_cache_invalidate(td, f);
}
dprint(FD_IO, "%s: rand offset failed, last=%llu, size=%llu\n",
{
unsigned int v;
- v = rand32_between(&td->rwmix_state, 1, 100);
+ v = rand_between(&td->rwmix_state, 1, 100);
if (v <= td->o.rwmix[DDIR_READ])
return DDIR_READ;
* io's that have been actually submitted to an async engine,
* and cur_depth is meaningless for sync engines.
*/
- if (td->io_u_queued || td->cur_depth) {
- int fio_unused ret;
-
- ret = td_io_commit(td);
- }
+ if (td->io_u_queued || td->cur_depth)
+ td_io_commit(td);
while (td->io_u_in_flight) {
int ret;
return &td->buf_state;
}
- v = rand32_between(&td->dedupe_state, 1, 100);
+ v = rand_between(&td->dedupe_state, 1, 100);
if (v <= td->o.dedupe_percentage)
return &td->buf_state_prev;