summaryrefslogtreecommitdiff
path: root/verify.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2012-02-22 20:11:57 +0100
committerJens Axboe <axboe@kernel.dk>2012-02-22 20:11:57 +0100
commitf65d1c2663ac6007eac1a2063fe25b4275d013e4 (patch)
tree87c254b56c1c0c45cbc3c4381cb3a32e67910064 /verify.h
parent8e8b225d177c8e824785a87a1116309049a27a7c (diff)
Add checksum to verify_header
Currently we don't know if the verify_header itself is valid when pulled off a disk. While it will fail verify if it is, fio might then confuse the 'expected' and 'received' data since it re-generates the corrupted crc with the seed stored. But if the seed is corrupt, then we fail. So checksum the verify header, so that we know for a fact whether the header is valid or not. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'verify.h')
-rw-r--r--verify.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/verify.h b/verify.h
index 49ce417..ec7365c 100644
--- a/verify.h
+++ b/verify.h
@@ -4,6 +4,7 @@
#include <stdint.h>
#define FIO_HDR_MAGIC 0xf00baaef
+#define FIO_HDR_MAGIC2 0xf00dbeef
enum {
VERIFY_NONE = 0, /* no verification */
@@ -28,10 +29,13 @@ enum {
* data.
*/
struct verify_header {
- unsigned int fio_magic;
- unsigned int len;
- unsigned int verify_type;
- unsigned long rand_seed;
+ uint32_t fio_magic;
+ uint32_t len;
+ uint32_t verify_type;
+ uint32_t pad1;
+ uint64_t rand_seed;
+ uint32_t pad2;
+ uint32_t crc32;
};
struct vhdr_md5 {