blktrace fixup + documentation

Add a little documentation on using blktrace data files.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/HOWTO b/HOWTO
index 0b43871..167ed7c 100644
--- a/HOWTO
+++ b/HOWTO
@@ -618,7 +618,12 @@
 
 read_iolog=str	Open an iolog with the specified file name and replay the
 		io patterns it contains. This can be used to store a
-		workload and replay it sometime later.
+		workload and replay it sometime later. The iolog given
+		may also be a blktrace binary file, which allows fio
+		to replay a workload captured by blktrace. See blktrace
+		for how to capture such logging data. For blktrace replay,
+		the file needs to be turned into a blkparse binary data
+		file first (blktrace <device> -d file_for_fio.bin).
 
 write_bw_log	If given, write a bandwidth log of the jobs in this job
 		file. Can be used to store data of the bandwidth of the
diff --git a/blktrace.c b/blktrace.c
index 864e9dc..1669fe5 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -100,6 +100,7 @@
 
 	rw = (t->action & BLK_TC_ACT(BLK_TC_WRITE)) != 0;
 	ios[rw]++;
+	td->o.size += t->bytes;
 	store_ipo(td, t->sector, t->bytes, rw, ttime);
 }
 
@@ -120,6 +121,8 @@
 		return 1;
 	}
 
+	td->o.size = 0;
+
 	ios[0] = ios[1] = 0;
 	ttime = 0;
 	do {