if (td->o.verify_pattern_bytes)
ret |= verify_io_u_pattern(hdr, vc);
+ /*
+ * For read-only workloads, the program cannot be certain of the
+ * last numberio written to a block. Checking of numberio will be done
+ * only for workloads that write data.
+ */
+ if (td_write(td) || td_rw(td))
+ if (vh->numberio != io_u->numberio)
+ ret = EILSEQ;
+
if (!ret)
return 0;
vh->time_sec = io_u->start_time.tv_sec;
vh->time_usec = io_u->start_time.tv_usec;
- vh->numberio = td->io_issues[DDIR_WRITE];
+ vh->numberio = io_u->numberio;
vh->offset = io_u->offset + header_num * td->o.verify_interval;
}
if (td->o.verify == VERIFY_NULL)
return;
+ io_u->numberio = td->io_issues[io_u->ddir];
+
fill_pattern_headers(td, io_u, 0, 0);
}
io_u->offset = ipo->offset;
io_u->buflen = ipo->len;
+ io_u->numberio = ipo->numberio;
io_u->file = ipo->file;
io_u->flags |= IO_U_F_VER_LIST;