*/
if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ &&
((io_u->flags & IO_U_F_VER_LIST) || !td_rw(td))) {
+
+ if (!td->o.verify_pattern_bytes) {
+ io_u->rand_seed = __rand(&td->__verify_state);
+ if (sizeof(int) != sizeof(long *))
+ io_u->rand_seed *= __rand(&td->__verify_state);
+ }
+
if (td->o.verify_async)
io_u->end_io = verify_io_u_async;
else
else
td_set_runstate(td, TD_RUNNING);
+ if (td_write(td) && io_u->ddir == DDIR_WRITE &&
+ td->o.do_verify &&
+ td->o.verify != VERIFY_NONE &&
+ !td->o.experimental_verify)
+ log_io_piece(td, io_u);
+
ret = td_io_queue(td, io_u);
switch (ret) {
case FIO_Q_COMPLETED:
utime_since_now(&td->start));
}
- if (td_write(td) && idx == DDIR_WRITE &&
- td->o.do_verify &&
- td->o.verify != VERIFY_NONE &&
- !td->o.experimental_verify)
- log_io_piece(td, io_u);
-
icd->bytes_done[idx] += bytes;
if (io_u->end_io) {
* drop the old one, which we rely on the rb insert/lookup for
* handling.
*/
- if ((!td_random(td) || !td->o.overwrite) &&
+ if (((!td->o.verifysort) || !td_random(td) || !td->o.overwrite) &&
(file_randommap(td, ipo->file) || td->o.verify == VERIFY_NONE)) {
INIT_FLIST_HEAD(&ipo->list);
flist_add_tail(&ipo->list, &td->io_hist_list);
if (use_seed)
__fill_random_buf(p, len, seed);
else
- io_u->rand_seed = fill_random_buf(&td->buf_state, p, len);
+ io_u->rand_seed = fill_random_buf(&td->__verify_state, p, len);
return;
}
-
+
if (io_u->buf_filled_len >= len) {
dprint(FD_VERIFY, "using already filled verify pattern b=%d len=%u\n",
td->o.verify_pattern_bytes, len);
memswp(p, p + td->o.verify_offset, header_size);
hdr = p;
+ /*
+ * Make rand_seed check pass when have verifysort or
+ * verify_backlog.
+ */
+ if (td->o.verifysort || (td->flags & TD_F_VER_BACKLOG))
+ io_u->rand_seed = hdr->rand_seed;
+
ret = verify_header(io_u, hdr);
switch (ret) {
case 0:
remove_trim_entry(td, ipo);
free(ipo);
dprint(FD_VERIFY, "get_next_verify: ret io_u %p\n", io_u);
+
+ if (!td->o.verify_pattern_bytes) {
+ io_u->rand_seed = __rand(&td->__verify_state);
+ if (sizeof(int) != sizeof(long *))
+ io_u->rand_seed *= __rand(&td->__verify_state);
+ }
return 0;
}