Fix refill buffers overwriting verify data
[fio.git] / blktrace.c
index 4d64b9f5f1f5cbbca263faa7107850999b50e8d9..46dc13bd6b7b9e1548fca5ecbcd1d413e623ea49 100644 (file)
@@ -219,7 +219,7 @@ static void store_ipo(struct thread_data *td, unsigned long long offset,
        queue_io_piece(td, ipo);
 }
 
-static void handle_trace_notify(struct thread_data *td, struct blk_io_trace *t)
+static void handle_trace_notify( struct blk_io_trace *t)
 {
        switch (t->action) {
        case BLK_TN_PROCESS:
@@ -266,7 +266,7 @@ static void handle_trace(struct thread_data *td, struct blk_io_trace *t,
                return;
 
        if (t->action & BLK_TC_ACT(BLK_TC_NOTIFY))
-               handle_trace_notify(td, t);
+               handle_trace_notify(t);
        else
                handle_trace_fs(td, t, ttime, ios, bs);
 }
@@ -346,8 +346,10 @@ int load_blktrace(struct thread_data *td, const char *filename)
 
                        ttime = t.time;
                        cpu = t.cpu;
-               } else
+               } else {
+                       delay = 0;
                        handle_trace(td, &t, delay, ios, rw_bs);
+               }
        } while (1);
 
        fifo_free(fifo);