if (f->last_pos >= f->real_file_size) {
if (!td_random(td) || get_next_rand_offset(td, f, ddir, &b))
return 1;
- } else {
- b = f->last_pos / td->o.min_bs[ddir];
- }
+ } else
+ b = (f->last_pos - f->file_offset) / td->o.min_bs[ddir];
}
io_u->offset = (b * td->o.min_bs[ddir]) + f->file_offset;
static int fill_io_u(struct thread_data *td, struct io_u *io_u)
{
+ if (td->io_ops->flags & FIO_NOIO)
+ goto out;
+
/*
* see if it's time to sync
*/
io_u_mark_latency(td, usec);
if (td_write(td) && idx == DDIR_WRITE &&
+ td->o.do_verify &&
td->o.verify != VERIFY_NONE)
log_io_piece(td, io_u);