Don't populate random data for verify reads
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index c0beafd46ad86e8640f815792b34af0078ef4856..8c2f33b5e85e1e16bb3d6aea7564cbd5181a5e62 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -838,7 +838,7 @@ struct io_u *get_io_u(struct thread_data *td)
 
                f->last_pos = io_u->offset + io_u->buflen;
 
-               if (td->o.verify != VERIFY_NONE)
+               if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_WRITE)
                        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);