- if (get_next_rand_offset(td, f, ddir, b)) {
- dprint(FD_IO, "%s: rand offset failed, last=%llu, size=%llu\n",
- f->file_name, f->last_pos, f->real_file_size);
- return 1;
+ if (!get_next_rand_offset(td, f, ddir, b))
+ return 0;
+
+ if (td->o.time_based) {
+ fio_file_reset(f);
+ if (!get_next_rand_offset(td, f, ddir, b))
+ return 0;