Fix refill buffers overwriting verify data
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_u.c b/io_u.c
index b10e83e..04900ee 100644
--- a/io_u.c
+++ b/io_u.c
@@ -818,6 +818,8 @@
if (td->o.verify != VERIFY_NONE)
populate_verify_io_u(td, io_u);
+ else if (td->o.refill_buffers && io_u->ddir == DDIR_WRITE)
+ io_u_fill_buffer(td, io_u, io_u->xfer_buflen);
}
/*
@@ -827,8 +829,6 @@
io_u->xfer_buf = io_u->buf;
io_u->xfer_buflen = io_u->buflen;
- if (td->o.refill_buffers && io_u->ddir == DDIR_WRITE)
- io_u_fill_buffer(td, io_u, io_u->xfer_buflen);
out:
if (!td_io_prep(td, io_u)) {
fio_gettime(&io_u->start_time, NULL);