Add version 2 of the iolog format

The old format had some short comings - notably not supporting > 1
file workloads. So add a new format that defines adding/open/close
of files. Fio will still load the older format iologs, but the new
ones wont work on older fio versions.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/ioengines.c b/ioengines.c
index feb986a..76e71b9 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -309,6 +309,7 @@
 		memset(f->file_map, 0, f->num_maps * sizeof(long));
 
 done:
+	log_file(td, f, FIO_LOG_OPEN_FILE);
 	td->nr_open_files++;
 	get_file(f);
 	return 0;
@@ -320,6 +321,9 @@
 
 void td_io_close_file(struct thread_data *td, struct fio_file *f)
 {
+	if (!(f->flags & FIO_FILE_CLOSING))
+		log_file(td, f, FIO_LOG_CLOSE_FILE);
+
 	/*
 	 * mark as closing, do real close when last io on it has completed
 	 */