5 #include "compiler/compiler.h"
6 #include "verify-state.h"
8 #define FIO_HDR_MAGIC 0xacca
11 VERIFY_NONE = 0, /* no verification */
12 VERIFY_HDR_ONLY, /* verify header only, kept for sake of
13 * compatibility with old configurations
14 * which use 'verify=meta' */
15 VERIFY_MD5, /* md5 sum data blocks */
16 VERIFY_CRC64, /* crc64 sum data blocks */
17 VERIFY_CRC32, /* crc32 sum data blocks */
18 VERIFY_CRC32C, /* crc32c sum data blocks */
19 VERIFY_CRC32C_INTEL, /* crc32c sum data blocks with hw */
20 VERIFY_CRC16, /* crc16 sum data blocks */
21 VERIFY_CRC7, /* crc7 sum data blocks */
22 VERIFY_SHA256, /* sha256 sum data blocks */
23 VERIFY_SHA512, /* sha512 sum data blocks */
24 VERIFY_SHA3_224, /* sha3-224 sum data blocks */
25 VERIFY_SHA3_256, /* sha3-256 sum data blocks */
26 VERIFY_SHA3_384, /* sha3-384 sum data blocks */
27 VERIFY_SHA3_512, /* sha3-512 sum data blocks */
28 VERIFY_XXHASH, /* xxhash sum data blocks */
29 VERIFY_SHA1, /* sha1 sum data blocks */
30 VERIFY_PATTERN, /* verify specific patterns */
31 VERIFY_PATTERN_NO_HDR, /* verify specific patterns, no hdr */
32 VERIFY_NULL, /* pretend to verify */
36 * A header structure associated with each checksummed data block. It is
37 * followed by a checksum specific header that contains the verification
40 struct verify_header {
54 uint32_t md5_digest[4];
56 struct vhdr_sha3_224 {
59 struct vhdr_sha3_256 {
62 struct vhdr_sha3_384 {
65 struct vhdr_sha3_512 {
96 extern void populate_verify_io_u(struct thread_data *, struct io_u *);
97 extern int __must_check get_next_verify(struct thread_data *td, struct io_u *);
98 extern int __must_check verify_io_u(struct thread_data *, struct io_u **);
99 extern int verify_io_u_async(struct thread_data *, struct io_u **);
100 extern void fill_verify_pattern(struct thread_data *td, void *p, unsigned int len, struct io_u *io_u, unsigned long seed, int use_seed);
101 extern void fill_buffer_pattern(struct thread_data *td, void *p, unsigned int len);
102 extern void fio_verify_init(struct thread_data *td);
105 * Async verify offload
107 extern int verify_async_init(struct thread_data *);
108 extern void verify_async_exit(struct thread_data *);
111 * Callbacks for pasting formats in the pattern buffer
113 extern int paste_blockoff(char *buf, unsigned int len, void *priv);