Fix refill buffers overwriting verify data
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index b10e83eee3b3871aa3ad7a957e3cc0ffec00ea00..04900ee1def3ad28867d40ea829d05886d93381f 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -818,6 +818,8 @@ struct io_u *get_io_u(struct thread_data *td)
 
                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 @@ struct io_u *get_io_u(struct thread_data *td)
        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);