aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-08-03 15:06:18 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-08-03 15:06:18 +0200
commitbc5f9ff87cb38ffa3b64ba607e535043eef06d14 (patch)
tree241627b88ed849148d09e2d61a1def44c1be8766
parentd0576a3a885b1b5fc6a47c35d9537d9717444238 (diff)
parent8e8bb835e375bd8cf0f01debff61f6bf467bb1ed (diff)
downloadblktrace-bc5f9ff87cb38ffa3b64ba607e535043eef06d14.tar.gz
Merge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace
-rw-r--r--blkparse.c6
-rw-r--r--blktrace.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/blkparse.c b/blkparse.c
index 8d5746f..12c7aae 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -2354,6 +2354,12 @@ static int ms_prime(struct ms_stream *msp)
if (verify_trace(bit))
goto err;
+ if (bit->cpu != pci->cpu) {
+ fprintf(stderr, "cpu %d trace info has error cpu %d\n",
+ pci->cpu, bit->cpu);
+ continue;
+ }
+
if (bit->action & BLK_TC_ACT(BLK_TC_NOTIFY) && bit->action != BLK_TN_MESSAGE) {
handle_notify(bit);
output_binary(bit, sizeof(*bit) + bit->pdu_len);
diff --git a/blktrace.h b/blktrace.h
index 816ce61..8b3e031 100644
--- a/blktrace.h
+++ b/blktrace.h
@@ -110,7 +110,7 @@ static inline void trace_to_cpu(struct blk_io_trace *t)
t->action = be32_to_cpu(t->action);
t->pid = be32_to_cpu(t->pid);
t->device = be32_to_cpu(t->device);
- t->cpu = be16_to_cpu(t->cpu);
+ t->cpu = be32_to_cpu(t->cpu);
t->error = be16_to_cpu(t->error);
t->pdu_len = be16_to_cpu(t->pdu_len);
}