Add verify trim support
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/blktrace.c b/blktrace.c
index 9ce4ae2..297a8a9 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -168,6 +168,7 @@
struct io_piece *ipo;
ipo = calloc(1, sizeof(*ipo));
+ init_ipo(ipo);
ipo->ddir = DDIR_INVAL;
ipo->fileno = fileno;
@@ -215,8 +216,8 @@
{
struct io_piece *ipo = malloc(sizeof(*ipo));
- memset(ipo, 0, sizeof(*ipo));
- INIT_FLIST_HEAD(&ipo->list);
+ init_ipo(ipo);
+
/*
* the 512 is wrong here, it should be the hardware sector size...
*/
@@ -256,6 +257,7 @@
{
struct io_piece *ipo = malloc(sizeof(*ipo));
+ init_ipo(ipo);
trace_add_file(td, t->device);
ios[DDIR_WRITE]++;