Add some support for a verify backlog

Instead of writing everything and then verifying everything,
allow a job to specify incremental verify stages. This can
help reduce memory consumption of fio, since we don't have
to store a huge number of verify entries to be processed
when the write phase is complete.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/fio.h b/fio.h
index 56aa9b6..2a762aa 100644
--- a/fio.h
+++ b/fio.h
@@ -185,6 +185,8 @@
 	unsigned int verify_pattern_bytes;
 	unsigned int verify_fatal;
 	unsigned int verify_async;
+	unsigned long long verify_backlog;
+	unsigned int verify_batch;
 	unsigned int use_thread;
 	unsigned int unlink;
 	unsigned int do_disk_util;
@@ -321,6 +323,7 @@
 	unsigned int ioprio;
 	unsigned int ioprio_set;
 	unsigned int last_was_sync;
+	enum fio_ddir last_ddir;
 
 	char *mmapfile;
 	int mmapfd;
@@ -335,6 +338,8 @@
 	os_random_state_t bsrange_state;
 	os_random_state_t verify_state;
 
+	unsigned int verify_batch;
+
 	int shm_id;
 
 	/*
@@ -410,6 +415,7 @@
 	 */
 	struct rb_root io_hist_tree;
 	struct flist_head io_hist_list;
+	unsigned long io_hist_len;
 
 	/*
 	 * For IO replaying