t/read-to-pipe-async: standalone test app
[fio.git] / verify.c
index 19bec75a4ec75d29e2af196f4ad41791a97efceb..0f43a3e0b22fc3bdadd4efa45dcac67f5c209865 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -780,6 +780,11 @@ err:
        log_err(" at file %s offset %llu, length %u\n",
                io_u->file->file_name,
                io_u->offset + hdr_num * hdr_len, hdr_len);
+
+       if (td->o.verify_dump)
+               dump_buf(p, hdr_len, io_u->offset + hdr_num * hdr_len,
+                               "hdr_fail", io_u->file);
+
        return EILSEQ;
 }
 
@@ -1380,6 +1385,7 @@ struct all_io_list *get_all_io_list(int save_mask, size_t *sz)
        *sz += nr * sizeof(struct thread_io_list);
        *sz += depth * sizeof(uint64_t);
        rep = malloc(*sz);
+       memset(rep, 0, *sz);
 
        rep->threads = cpu_to_le64((uint64_t) nr);
 
@@ -1603,7 +1609,7 @@ int verify_state_hdr(struct verify_state_hdr *hdr, struct thread_io_list *s,
        hdr->size = le64_to_cpu(hdr->size);
        hdr->crc = le64_to_cpu(hdr->crc);
 
-       if (hdr->version != VSTATE_HDR_VERSION ||
+       if (hdr->version != VSTATE_HDR_VERSION &&
            hdr->version != VSTATE_HDR_VERSION_V1)
                return 1;