Verify doesn't really work on mixed read/write workloads, so warn
authorJens Axboe <jens.axboe@oracle.com>
Wed, 6 Feb 2008 13:40:14 +0000 (14:40 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 6 Feb 2008 13:40:14 +0000 (14:40 +0100)
Unless the file is pre-populated, this cannot work. So warn the user
of such a bad construct, since the warning he/she receives from fio
only tells you about a verification error (which, technically, is what
is happening).

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
init.c

diff --git a/init.c b/init.c
index 134d5f24cdb3ef9147b17b5088c950cd3d949a58..64023458d03250e87d4064aef02f21292f149028 100644 (file)
--- a/init.c
+++ b/init.c
@@ -295,6 +295,10 @@ static int fixup_options(struct thread_data *td)
 
        if (o->fill_device && !o->size)
                o->size = ULONG_LONG_MAX;
 
        if (o->fill_device && !o->size)
                o->size = ULONG_LONG_MAX;
+       
+       if (td_rw(td) && td->o.verify != VERIFY_NONE)
+               log_info("fio: mixed read/write workload with verify. May not "
+                "work as expected, unless you pre-populated the file\n");
 
        return 0;
 }
 
        return 0;
 }