Makefile: ensure we kill all object files
[fio.git] / blktrace.c
index b37a54e9e1cd36ec75dffb7e9a03bfbec8e3f886..3c66c5afb971723518f95608f81bcb3083a70dcc 100644 (file)
@@ -273,6 +273,9 @@ static void handle_trace_discard(struct thread_data *td,
        unsigned int bs;
        int fileno;
 
+       if (td->o.replay_skip & (1u << DDIR_TRIM))
+               return;
+
        ipo = calloc(1, sizeof(*ipo));
        init_ipo(ipo);
        fileno = trace_add_file(td, t->device, &bs);
@@ -312,13 +315,17 @@ static void handle_trace_fs(struct thread_data *td, struct blk_io_trace *t,
 
        rw = (t->action & BLK_TC_ACT(BLK_TC_WRITE)) != 0;
 
-       /*
-        * Need to figure out why 0 byte writes end up here sometimes, for
-        * now just ignore them.
-        */
-       if (!t->bytes)
-               return;
-       else if (t->bytes > rw_bs[rw])
+       if (rw) {
+               if (td->o.replay_skip & (1u << DDIR_WRITE))
+                       return;
+       } else {
+               if (td->o.replay_skip & (1u << DDIR_READ))
+                       return;
+       }
+
+       assert(t->bytes);
+
+       if (t->bytes > rw_bs[rw])
                rw_bs[rw] = t->bytes;
 
        ios[rw]++;
@@ -333,6 +340,9 @@ static void handle_trace_flush(struct thread_data *td, struct blk_io_trace *t,
        unsigned int bs;
        int fileno;
 
+       if (td->o.replay_skip & (1u << DDIR_SYNC))
+               return;
+
        ipo = calloc(1, sizeof(*ipo));
        init_ipo(ipo);
        fileno = trace_add_file(td, t->device, &bs);