blktrace bits accidentally got committed
authorJens Axboe <jens.axboe@oracle.com>
Fri, 7 Mar 2008 12:20:54 +0000 (13:20 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 7 Mar 2008 12:20:54 +0000 (13:20 +0100)
It was the start of handling notifies correctly, didn't mean to commit
them with the previous fix. So roll them out, commit when done.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
blktrace.c

index 111619c6c47301bbf1208895c6315ed3497c22f8..b7071808ccec0b9aec5a49fa85460ad823a963be 100644 (file)
@@ -204,29 +204,6 @@ static void store_ipo(struct thread_data *td, unsigned long long offset,
        list_add_tail(&ipo->list, &td->io_log_list);
 }
 
        list_add_tail(&ipo->list, &td->io_log_list);
 }
 
-static void handle_trace_notify(struct thread_data *td, struct blk_io_trace *t)
-{
-       printf("got notify: %x, %d\n", t->action, t->pid);
-}
-
-static void handle_trace_fs(struct thread_data *td, struct blk_io_trace *t,
-                           unsigned long long ttime, unsigned long *ios,
-                           unsigned int *bs)
-{
-       int rw;
-
-       trace_add_file(td, t->device);
-
-       rw = (t->action & BLK_TC_ACT(BLK_TC_WRITE)) != 0;
-
-       if (t->bytes > bs[rw])
-               bs[rw] = t->bytes;
-
-       ios[rw]++;
-       td->o.size += t->bytes;
-       store_ipo(td, t->sector, t->bytes, rw, ttime);
-}
-
 /*
  * We only care for queue traces, most of the others are side effects
  * due to internal workings of the block layer.
 /*
  * We only care for queue traces, most of the others are side effects
  * due to internal workings of the block layer.
@@ -235,15 +212,25 @@ static void handle_trace(struct thread_data *td, struct blk_io_trace *t,
                         unsigned long long ttime, unsigned long *ios,
                         unsigned int *bs)
 {
                         unsigned long long ttime, unsigned long *ios,
                         unsigned int *bs)
 {
+       int rw;
+
        if ((t->action & 0xffff) != __BLK_TA_QUEUE)
                return;
        if (t->action & BLK_TC_ACT(BLK_TC_PC))
                return;
        if ((t->action & 0xffff) != __BLK_TA_QUEUE)
                return;
        if (t->action & BLK_TC_ACT(BLK_TC_PC))
                return;
-
        if (t->action & BLK_TC_ACT(BLK_TC_NOTIFY))
        if (t->action & BLK_TC_ACT(BLK_TC_NOTIFY))
-               handle_trace_notify(td, t);
-       else
-               handle_trace_fs(td, t, ttime, ios, bs);
+               return;
+
+       trace_add_file(td, t->device);
+
+       rw = (t->action & BLK_TC_ACT(BLK_TC_WRITE)) != 0;
+
+       if (t->bytes > bs[rw])
+               bs[rw] = t->bytes;
+
+       ios[rw]++;
+       td->o.size += t->bytes;
+       store_ipo(td, t->sector, t->bytes, rw, ttime);
 }
 
 /*
 }
 
 /*