f->last_pos = io_u->offset + io_u->buflen;
if (io_u->ddir == DDIR_WRITE) {
- if (td->o.verify != VERIFY_NONE)
- populate_verify_io_u(td, io_u);
- else if (td->o.refill_buffers) {
+ if (td->o.refill_buffers) {
io_u_fill_buffer(td, io_u,
io_u->xfer_buflen, io_u->xfer_buflen);
} else if (td->o.scramble_buffers)
do_scramble = 1;
+ if (td->o.verify != VERIFY_NONE) {
+ populate_verify_io_u(td, io_u);
+ do_scramble = 0;
+ }
} else if (io_u->ddir == DDIR_READ) {
/*
* Reset the buf_filled parameters so next time if the
unsigned int perc = td->o.compress_percentage;
if (perc) {
+ unsigned int seg = min_write;
+
+ seg = min(min_write, td->o.compress_chunk);
fill_random_buf_percentage(&td->buf_state, io_u->buf,
- perc, min_write, max_bs);
+ perc, seg, max_bs);
} else
fill_random_buf(&td->buf_state, io_u->buf, max_bs);
} else