summaryrefslogtreecommitdiff
path: root/blktrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'blktrace.h')
-rw-r--r--blktrace.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/blktrace.h b/blktrace.h
index 91c386b..167785c 100644
--- a/blktrace.h
+++ b/blktrace.h
@@ -7,7 +7,7 @@
#include "blktrace_api.h"
#define CHECK_MAGIC(t) (((t)->magic & 0xffffff00) == BLK_IO_TRACE_MAGIC)
-#define SUPPORTED_VERSION (0x03)
+#define SUPPORTED_VERSION (0x04)
#if defined(__LITTLE_ENDIAN_BITFIELD)
#define be16_to_cpu(x) __bswap_16(x)
@@ -51,9 +51,11 @@ static inline void trace_to_be(struct blk_io_trace *t)
t->bytes = cpu_to_be32(t->bytes);
t->action = cpu_to_be32(t->action);
t->pid = cpu_to_be32(t->pid);
- t->cpu = cpu_to_be16(t->cpu);
+ t->cpu = cpu_to_be32(t->cpu);
t->error = cpu_to_be16(t->error);
t->pdu_len = cpu_to_be16(t->pdu_len);
+ t->device = cpu_to_be32(t->device);
+ /* t->comm is a string (endian neutral) */
}
static inline void trace_to_cpu(struct blk_io_trace *t)
@@ -65,9 +67,11 @@ static inline void trace_to_cpu(struct blk_io_trace *t)
t->bytes = be32_to_cpu(t->bytes);
t->action = be32_to_cpu(t->action);
t->pid = be32_to_cpu(t->pid);
- 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);
+ t->device = be32_to_cpu(t->device);
+ /* t->comm is a string (endian neutral) */
}
#endif