Merge branch 'master' of ssh://router/data/git/fio
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index f9b7e02ffb60a586ebf6d19c2e548df65e29367b..28be099ab71d432174e1fd1560afd1bf4e596c00 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -563,7 +563,16 @@ void do_verify(struct thread_data *td)
        struct io_u *io_u, *v_io_u = NULL;
        struct io_completion_data icd;
        struct fio_file *f;
-       int ret;
+       int ret, i;
+
+       /*
+        * sync io first and invalidate cache, to make sure we really
+        * read from disk.
+        */
+       for_each_file(td, f, i) {
+               td_io_sync(td, f);
+               file_invalidate_cache(td, f);
+       }
 
        td_set_runstate(td, TD_VERIFYING);