If verify is enabled, automatically enable refill_buffers
authorJens Axboe <jens.axboe@oracle.com>
Thu, 22 May 2008 07:17:33 +0000 (09:17 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 22 May 2008 07:17:33 +0000 (09:17 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
HOWTO
init.c

diff --git a/HOWTO b/HOWTO
index 36e42aaf6b9defb210d83d0b538284bea7f6a4d6..e4fccb55f3e689bb1c7d9f4c6d09ae9346a2b7dd 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -339,7 +339,8 @@ zero_buffers        If this option is given, fio will init the IO buffers to
 refill_buffers If this option is given, fio will refill the IO buffers
                on every submit. The default is to only fill it at init
                time and reuse that data. Only makes sense if zero_buffers
-               isn't specified, naturally.
+               isn't specified, naturally. If data verification is enabled,
+               refill_buffers is also automatically enabled.
 
 nrfiles=int    Number of files to use for this job. Defaults to 1.
 
diff --git a/init.c b/init.c
index 63aaa76fb0cdd581a9fab0c8c4fa5bacc392a8e4..2a3fcee73ddb7eeb9839650ba3ee28286f6ca581 100644 (file)
--- a/init.c
+++ b/init.c
@@ -314,6 +314,9 @@ static int fixup_options(struct thread_data *td)
                log_info("fio: mixed read/write workload with verify. May not "
                 "work as expected, unless you pre-populated the file\n");
 
+       if (td->o.verify != VERIFY_NONE)
+               td->o.refill_buffers = 1;
+
        return 0;
 }