{
struct io_completion_data icd;
+ struct timespec *tvp = NULL;
int ret;
if (min_events > 0) {
td_verror(td, -ret);
return ret;
}
+ } else {
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 0, };
+
+ tvp = &ts;
}
- ret = td_io_getevents(td, min_events, td->cur_depth, NULL);
+ ret = td_io_getevents(td, min_events, td->cur_depth, tvp);
if (ret < 0) {
td_verror(td, -ret);
return ret;
return -1;
}
+
+/*
+ * Call when io_u is really queued, to update the submission latency.
+ */
+void io_u_queued(struct thread_data *td, struct io_u *io_u)
+{
+ unsigned long slat_time;
+
+ slat_time = mtime_since(&io_u->start_time, &io_u->issue_time);
+ add_slat_sample(td, io_u->ddir, slat_time);
+}