[PATCH] Sync and invalidate cache prior to running verify

Make sure we re-read the contents from disk, not from memory.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 2b760dd..5432e38 100644
--- a/fio.c
+++ b/fio.c
@@ -563,7 +563,16 @@
 	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);