static void iolog_delay(struct thread_data *td, unsigned long delay)
{
uint64_t usec = utime_since_now(&td->last_issue);
+ unsigned long orig_delay = delay;
uint64_t this_delay;
struct timespec ts;
}
usec = utime_since_now(&ts);
- if (usec > delay)
- td->time_offset = usec - delay;
+ if (usec > orig_delay)
+ td->time_offset = usec - orig_delay;
else
td->time_offset = 0;
}
}
/*
- * We don't need to sort the entries if we only performed sequential
- * writes. In this case, just reading back data in the order we wrote
- * it out is the faster but still safe.
- *
- * One exception is if we don't have a random map in which case we need
+ * Only sort writes if we don't have a random map in which case we need
* to check for duplicate blocks and drop the old one, which we rely on
* the rb insert/lookup for handling.
*/
- if (((!td->o.verifysort) || !td_random(td)) &&
- file_randommap(td, ipo->file)) {
+ if (file_randommap(td, ipo->file)) {
INIT_FLIST_HEAD(&ipo->list);
flist_add_tail(&ipo->list, &td->io_hist_list);
ipo->flags |= IP_F_ONLIST;