Unfortunately it looks like we have to support this for now,
as it appears relayfs will still miss events on buffer wraps
for the read cases.
return NULL;
}
+static int get_event(struct thread_information *tip, struct blk_io_trace *bit)
+{
+ void *p = &bit->sequence;
+
+ do {
+ if (read_data(tip, bit, sizeof(bit->magic)))
+ return -1;
+
+ } while (!CHECK_MAGIC(bit));
+
+ if (!read_data(tip, p, sizeof(*bit) - sizeof(bit->magic)))
+ return 0;
+
+ return -1;
+}
+
static inline void tip_fd_unlock(struct thread_information *tip)
{
if (tip->fd_lock)
pdu_data = NULL;
while (!is_done()) {
- if (read_data(tip, &t, sizeof(t)))
+ if (get_event(tip, &t))
break;
if (verify_trace(&t))