If we set verify_backlog=32, we expect 32 writes followed by 32
reads that verify the written data. But if we fail getting a
verify io_u, then we may decrement the batch counter when we should
not. The result is that we write 32, read 32, write 1, read 1, repeat.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
if (td->o.verify_backlog && td->io_hist_len) {
int get_verify = 0;
if (td->o.verify_backlog && td->io_hist_len) {
int get_verify = 0;
- if (td->verify_batch) {
- td->verify_batch--;
- } else if (!(td->io_hist_len % td->o.verify_backlog) &&
+ else if (!(td->io_hist_len % td->o.verify_backlog) &&
td->last_ddir != DDIR_READ) {
td->verify_batch = td->o.verify_batch;
if (!td->verify_batch)
td->last_ddir != DDIR_READ) {
td->verify_batch = td->o.verify_batch;
if (!td->verify_batch)
- if (get_verify && !get_next_verify(td, io_u))
+ if (get_verify && !get_next_verify(td, io_u)) {
+ td->verify_batch--;