Bad style
[fio.git] / blktrace.c
index 4469243efdb502f97314b81e61f614ab3f854aaf..6cf8d461fb0aea44bc292eccc2b983747f5a5432 100644 (file)
@@ -10,7 +10,7 @@
 #include "fio.h"
 #include "blktrace_api.h"
 
-#define TRACE_FIFO_SIZE        65536
+#define TRACE_FIFO_SIZE        8192
 
 /*
  * fifo refill frontend, to avoid reading data in trace sized bites
@@ -187,7 +187,7 @@ static void trace_add_file(struct thread_data *td, __u32 device)
                int fileno;
 
                dprint(FD_BLKTRACE, "add devices %s\n", dev);
-               fileno = add_file(td, dev);
+               fileno = add_file_exclusive(td, dev);
                trace_add_open_event(td, fileno);
        }
 }
@@ -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 blk_io_trace *t)
+static void handle_trace_notify(struct blk_io_trace *t)
 {
        switch (t->action) {
        case BLK_TN_PROCESS:
@@ -341,8 +341,16 @@ int load_blktrace(struct thread_data *td, const char *filename)
                                delay = t.time - ttime;
                        if ((t.action & BLK_TC_ACT(BLK_TC_WRITE)) && read_only)
                                skipped_writes++;
-                       else
+                       else {
+                               /*
+                                * set delay to zero if no_stall enabled for
+                                * fast replay
+                                */
+                               if (td->o.no_stall)
+                                       delay = 0;
+
                                handle_trace(td, &t, delay, ios, rw_bs);
+                       }
 
                        ttime = t.time;
                        cpu = t.cpu;