- io_u->file = td->files[ipo->fileno];
- get_file(io_u->file);
-
- dprint(FD_IO, "iolog: get %llu/%lu/%s\n", io_u->offset,
- io_u->buflen, io_u->file->file_name);
-
- if (ipo->delay)
- iolog_delay(td, ipo->delay);
+ if (ipo->ddir != DDIR_WAIT) {
+ io_u->offset = ipo->offset;
+ io_u->buflen = ipo->len;
+ io_u->file = td->files[ipo->fileno];
+ get_file(io_u->file);
+ dprint(FD_IO, "iolog: get %llu/%lu/%s\n", io_u->offset,
+ io_u->buflen, io_u->file->file_name);
+ if (ipo->delay)
+ iolog_delay(td, ipo->delay);
+ } else {
+ elapsed = mtime_since_genesis();
+ if (ipo->delay > elapsed)
+ usec_sleep(td, (ipo->delay - elapsed) * 1000);
+
+ }