ifp = fopen(file, "r");
while ((n = fread(bit, sizeof(struct blk_io_trace), 1, ifp)) == 1) {
+ if (data_is_native == -1)
+ check_data_endianness(bit->magic);
+
trace_to_cpu(bit);
- if (verify_trace(bit)) {
+
+ if (!CHECK_MAGIC(bit)) {
INC_BAD("bad trace");
continue;
}
+ if ((bit->magic & 0xff) != SUPPORTED_VERSION) {
+ fprintf(stderr, "unsupported trace version\n");
+ break;
+ }
+
if (bit->pdu_len) {
char *pdu_buf;
continue;
}
+ /*
+ * skip notify traces, they don't have valid sequences
+ */
+ if (bit->action & BLK_TC_ACT(BLK_TC_NOTIFY))
+ continue;
+
if (ngood) {
if (bit->sequence <= save_sequence) {
INC_BAD("bad seq");