Honor refill_buffers even for verifies
authorJens Axboe <axboe@kernel.dk>
Fri, 9 Mar 2012 18:02:01 +0000 (19:02 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 9 Mar 2012 18:02:01 +0000 (19:02 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_u.c

diff --git a/io_u.c b/io_u.c
index 06ca711b57e4ec9a18bf39d75acf2c98ce13740e..ca33e589c6500f36a76e75cbdadc98a73ef4750f 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -1226,13 +1226,15 @@ struct io_u *get_io_u(struct thread_data *td)
                f->last_pos = io_u->offset + io_u->buflen;
 
                if (io_u->ddir == DDIR_WRITE) {
                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;
                                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
                } else if (io_u->ddir == DDIR_READ) {
                        /*
                         * Reset the buf_filled parameters so next time if the