Rename crc functions to private namespace
authorJens Axboe <axboe@kernel.dk>
Wed, 29 Feb 2012 09:01:34 +0000 (10:01 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 29 Feb 2012 09:01:34 +0000 (10:01 +0100)
Apparently we overlap with some gtk (?) crc32() functions, causing
ours to be called and subsequently crashing since the arguments
aren't the same.

Move everything to a fio_ protected namespace.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
19 files changed:
crc/crc16.c
crc/crc16.h
crc/crc32.c
crc/crc32.h
crc/crc32c.h
crc/crc64.c
crc/crc64.h
crc/crc7.c
crc/crc7.h
crc/md5.c
crc/md5.h
crc/sha1.c
crc/sha1.h
crc/sha256.c
crc/sha256.h
crc/sha512.c
crc/sha512.h
server.c
verify.c

index d9c4e4917643e2539ac72f8712894cb09ac2c4c0..f593f710dfc12d7fa59a1e167e56ea193e1c0b58 100644 (file)
@@ -43,7 +43,7 @@ unsigned short const crc16_table[256] = {
        0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040
 };
 
-unsigned short crc16(const void *buffer, unsigned int len)
+unsigned short fio_crc16(const void *buffer, unsigned int len)
 {
        const unsigned char *cp = (const unsigned char *) buffer;
        unsigned short crc = 0;
index 6c078a4e682cca11fc4233a3a566dfcb9f721327..433a7b144203601b4fa147c45b820fc1b60132ee 100644 (file)
@@ -17,7 +17,7 @@
 
 extern unsigned short const crc16_table[256];
 
-extern unsigned short crc16(const void *buffer, unsigned int len);
+extern unsigned short fio_crc16(const void *buffer, unsigned int len);
 
 static inline unsigned short crc16_byte(unsigned short crc,
                                        const unsigned char data)
index 4afed1af68c0442d4043ccb3a153543c81cbfef5..657031d47024f93e011479c1959821182fe55533 100644 (file)
@@ -73,7 +73,7 @@ static const uint32_t crctab[256] = {
   0xA2F33668, 0xBCB4666D, 0xB8757BDA, 0xB5365D03, 0xB1F740B4
 };
 
-uint32_t crc32(const void *buffer, unsigned long length)
+uint32_t fio_crc32(const void *buffer, unsigned long length)
 {
        const unsigned char *cp = (const unsigned char *) buffer;
        uint32_t crc = 0;
index d59a56072be537277691aef4cc08b1b749fc4ad8..674057b23b46ce2e5b1852fda46a743182f75987 100644 (file)
@@ -18,6 +18,6 @@
 #ifndef CRC32_H
 #define CRC32_H
 
-extern uint32_t crc32(const void * const, unsigned long);
+extern uint32_t fio_crc32(const void * const, unsigned long);
 
 #endif
index 46c106393ef13f6012d977d55e36fb414ede87f9..11bcf9c8f4e8577efccf7eac467043bd572e617f 100644 (file)
@@ -33,7 +33,7 @@ static inline void crc32c_intel_probe(void)
 }
 #endif
 
-static inline uint32_t crc32c(unsigned char const *buf, unsigned long len)
+static inline uint32_t fio_crc32c(unsigned char const *buf, unsigned long len)
 {
        if (crc32c_intel_available)
                return crc32c_intel(buf, len);
index a61d432cf30f71683c61d4dc2105082f0ae2428b..bf24a97bf2b2e37efffd46d7890beddfa48e6b40 100644 (file)
@@ -92,7 +92,7 @@ static const unsigned long long crctab64[256] = {
   0x29b7d047efec8728ULL
 };
 
-unsigned long long crc64(const unsigned char *buffer, unsigned long length)
+unsigned long long fio_crc64(const unsigned char *buffer, unsigned long length)
 {
        unsigned long long crc = 0;
 
index e4310c2b8e9c059bee93f1f24e0baa18f98f9a81..fe9cad3e269a642a8c4cb1a75320f2016ef5c1d5 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef CRC64_H
 #define CRC64_H
 
-unsigned long long crc64(const unsigned char *, unsigned long);
+unsigned long long fio_crc64(const unsigned char *, unsigned long);
 
 #endif
index 47aa332c128c49f2db3e83102ca22f8fabc8ee9e..bf7fd1c50e5e8ede19d831a31c14ad686ed30e4d 100644 (file)
@@ -43,7 +43,7 @@ const unsigned char crc7_syndrome_table[256] = {
        0x46, 0x4f, 0x54, 0x5d, 0x62, 0x6b, 0x70, 0x79
 };
 
-unsigned char crc7(const unsigned char *buffer, unsigned int len)
+unsigned char fio_crc7(const unsigned char *buffer, unsigned int len)
 {
        unsigned char crc = 0;
 
index 6ff3cd871cc8c1a9cf17e524e5dbc05a7412cbea..5d5d18884c46258550334d64f1b959e2926c30f3 100644 (file)
@@ -8,6 +8,6 @@ static inline unsigned char crc7_byte(unsigned char crc, unsigned char data)
        return crc7_syndrome_table[(crc << 1) ^ data];
 }
 
-extern unsigned char crc7(const unsigned char *buffer, unsigned int len);
+extern unsigned char fio_crc7(const unsigned char *buffer, unsigned int len);
 
 #endif
index 8f9adb22ee745e41a8a212654524cefb67e8fd55..0da85e43f3c50fbfd23c12021e6b1f32d949f269 100644 (file)
--- a/crc/md5.c
+++ b/crc/md5.c
@@ -88,7 +88,7 @@ static void md5_transform(uint32_t *hash, uint32_t const *in)
        hash[3] += d;
 }
 
-void md5_init(struct md5_ctx *mctx)
+void fio_md5_init(struct fio_md5_ctx *mctx)
 {
        mctx->hash[0] = 0x67452301;
        mctx->hash[1] = 0xefcdab89;
@@ -96,7 +96,8 @@ void md5_init(struct md5_ctx *mctx)
        mctx->hash[3] = 0x10325476;
 }
 
-void md5_update(struct md5_ctx *mctx, const uint8_t *data, unsigned int len)
+void fio_md5_update(struct fio_md5_ctx *mctx, const uint8_t *data,
+                   unsigned int len)
 {
        const uint32_t avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
 
index 6747d3067222a9b65afd56eec07cfd4de3cfc92c..668f0e933735ccffba14b2ea2206256ac73bc0c8 100644 (file)
--- a/crc/md5.h
+++ b/crc/md5.h
 #define MD5STEP(f, w, x, y, z, in, s) \
        (w += f(x, y, z) + in, w = (w<<s | w>>(32-s)) + x)
 
-struct md5_ctx {
+struct fio_md5_ctx {
        uint32_t *hash;
        uint32_t block[MD5_BLOCK_WORDS];
        uint64_t byte_count;
 };
 
-extern void md5_update(struct md5_ctx *, const uint8_t *, unsigned int);
-extern void md5_init(struct md5_ctx *);
+extern void fio_md5_update(struct fio_md5_ctx *, const uint8_t *, unsigned int);
+extern void fio_md5_init(struct fio_md5_ctx *);
 
 #endif
index 620679783b40df5e5d1d574a01efff274801fd13..117fbd9c2938b35a57b691ab05cf5a5acb8bcfad 100644 (file)
@@ -10,9 +10,9 @@
 #include "sha1.h"
 
 /* Hash one 64-byte block of data */
-static void blk_SHA1Block(struct sha1_ctx *ctx, const unsigned int *data);
+static void blk_SHA1Block(struct fio_sha1_ctx *ctx, const unsigned int *data);
 
-void sha1_init(struct sha1_ctx *ctx)
+void fio_sha1_init(struct fio_sha1_ctx *ctx)
 {
        ctx->size = 0;
 
@@ -25,7 +25,8 @@ void sha1_init(struct sha1_ctx *ctx)
        ctx->H[4] = 0xc3d2e1f0;
 }
 
-void sha1_update(struct sha1_ctx *ctx, const void *data, unsigned long len)
+void fio_sha1_update(struct fio_sha1_ctx *ctx, const void *data,
+                    unsigned long len)
 {
        int lenW = ctx->size & 63;
 
@@ -54,7 +55,7 @@ void sha1_update(struct sha1_ctx *ctx, const void *data, unsigned long len)
                memcpy(ctx->W, data, len);
 }
 
-void sha1_final(unsigned char hashout[20], struct sha1_ctx *ctx)
+void fio_sha1_final(unsigned char hashout[20], struct fio_sha1_ctx *ctx)
 {
        static const unsigned char pad[64] = { 0x80 };
        unsigned int padlen[2];
@@ -66,8 +67,8 @@ void sha1_final(unsigned char hashout[20], struct sha1_ctx *ctx)
        padlen[1] = htonl(ctx->size << 3);
 
        i = ctx->size & 63;
-       sha1_update(ctx, pad, 1+ (63 & (55 - i)));
-       sha1_update(ctx, padlen, 8);
+       fio_sha1_update(ctx, pad, 1+ (63 & (55 - i)));
+       fio_sha1_update(ctx, padlen, 8);
 
        /* Output hash
         */
@@ -111,7 +112,7 @@ void sha1_final(unsigned char hashout[20], struct sha1_ctx *ctx)
 #define T_40_59(t, A, B, C, D, E) SHA_ROUND(t, SHA_MIX, ((B&C)+(D&(B^C))) , 0x8f1bbcdc, A, B, C, D, E )
 #define T_60_79(t, A, B, C, D, E) SHA_ROUND(t, SHA_MIX, (B^C^D) ,  0xca62c1d6, A, B, C, D, E )
 
-static void blk_SHA1Block(struct sha1_ctx *ctx, const unsigned int *data)
+static void blk_SHA1Block(struct fio_sha1_ctx *ctx, const unsigned int *data)
 {
        unsigned int A,B,C,D,E;
        unsigned int array[16];
index af4165af47ab6f606b78e4a3fe777dc9c9233ce7..14af44a922a70686bc96c4477c3ca202761b947e 100644 (file)
@@ -7,14 +7,14 @@
  * and to avoid unnecessary copies into the context array.
  */
 
-struct sha1_ctx {
+struct fio_sha1_ctx {
        uint32_t *H;
        unsigned int W[16];
        unsigned long long size;
 };
 
-void sha1_init(struct sha1_ctx *);
-void sha1_update(struct sha1_ctx *, const void *dataIn, unsigned long len);
-void sha1_final(unsigned char hashout[20], struct sha1_ctx *);
+void fio_sha1_init(struct fio_sha1_ctx *);
+void fio_sha1_update(struct fio_sha1_ctx *, const void *dataIn, unsigned long len);
+void fio_sha1_final(unsigned char hashout[20], struct fio_sha1_ctx *);
 
 #endif
index dcb1677274a128cd584a19d4144a776531c3b187..3a72a5bfb2e14bbcc0d718acfa9e296ec9c48ded 100644 (file)
@@ -227,7 +227,7 @@ static void sha256_transform(uint32_t *state, const uint8_t *input)
        memset(W, 0, 64 * sizeof(uint32_t));
 }
 
-void sha256_init(struct sha256_ctx *sctx)
+void fio_sha256_init(struct fio_sha256_ctx *sctx)
 {
        sctx->state[0] = H0;
        sctx->state[1] = H1;
@@ -240,8 +240,8 @@ void sha256_init(struct sha256_ctx *sctx)
        sctx->count[0] = sctx->count[1] = 0;
 }
 
-void sha256_update(struct sha256_ctx *sctx, const uint8_t *data,
-                  unsigned int len)
+void fio_sha256_update(struct fio_sha256_ctx *sctx, const uint8_t *data,
+                      unsigned int len)
 {
        unsigned int i, idx, part_len;
 
index a3ca0e672e2da455b91801f13e908a1f18d9643a..c7aa28fd9f284672af80263fdbf2702c81acac66 100644 (file)
@@ -1,13 +1,13 @@
 #ifndef FIO_SHA256_H
 #define FIO_SHA256_H
 
-struct sha256_ctx {
+struct fio_sha256_ctx {
        uint32_t count[2];
        uint32_t state[8];
        uint8_t *buf;
 };
 
-void sha256_init(struct sha256_ctx *);
-void sha256_update(struct sha256_ctx *, const uint8_t *, unsigned int);
+void fio_sha256_init(struct fio_sha256_ctx *);
+void fio_sha256_update(struct fio_sha256_ctx *, const uint8_t *, unsigned int);
 
 #endif
index 9268a4900e01006ddae9ca2c6fc745a5e146e523..e069a4489e5816dfcd817bf1c32fab2d6acb5504 100644 (file)
@@ -146,7 +146,7 @@ static void sha512_transform(uint64_t *state, uint64_t *W, const uint8_t *input)
        a = b = c = d = e = f = g = h = t1 = t2 = 0;
 }
 
-void sha512_init(struct sha512_ctx *sctx)
+void fio_sha512_init(struct fio_sha512_ctx *sctx)
 {
        sctx->state[0] = H0;
        sctx->state[1] = H1;
@@ -159,8 +159,8 @@ void sha512_init(struct sha512_ctx *sctx)
        sctx->count[0] = sctx->count[1] = sctx->count[2] = sctx->count[3] = 0;
 }
 
-void sha512_update(struct sha512_ctx *sctx, const uint8_t *data,
-                  unsigned int len)
+void fio_sha512_update(struct fio_sha512_ctx *sctx, const uint8_t *data,
+                      unsigned int len)
 {
        unsigned int i, idx, part_len;
 
index 46e10cb777710b32bcd66d8630d2b4db08e6e866..f8b2112aedb1ecc50ada88cd13a7e7cc1050295c 100644 (file)
@@ -1,14 +1,14 @@
 #ifndef FIO_SHA512_H
 #define FIO_SHA512_H
 
-struct sha512_ctx {
+struct fio_sha512_ctx {
        uint64_t state[8];
        uint32_t count[4];
        uint8_t *buf;
        uint64_t W[80];
 };
 
-void sha512_init(struct sha512_ctx *);
-void sha512_update(struct sha512_ctx *, const uint8_t *, unsigned int);
+void fio_sha512_init(struct fio_sha512_ctx *);
+void fio_sha512_update(struct fio_sha512_ctx *, const uint8_t *, unsigned int);
 
 #endif
index 84b106e805a4bd178a189ebb556c384fba307a04..5e94696eb6aa6ee79d34668723b3981f1384d4dd 100644 (file)
--- a/server.c
+++ b/server.c
@@ -124,7 +124,7 @@ static int verify_convert_cmd(struct fio_net_cmd *cmd)
        cmd->cmd_crc16 = le16_to_cpu(cmd->cmd_crc16);
        cmd->pdu_crc16 = le16_to_cpu(cmd->pdu_crc16);
 
-       crc = crc16(cmd, FIO_NET_CMD_CRC_SZ);
+       crc = fio_crc16(cmd, FIO_NET_CMD_CRC_SZ);
        if (crc != cmd->cmd_crc16) {
                log_err("fio: server bad crc on command (got %x, wanted %x)\n",
                                cmd->cmd_crc16, crc);
@@ -202,7 +202,7 @@ struct fio_net_cmd *fio_net_recv_cmd(int sk)
                        break;
 
                /* Verify payload crc */
-               crc = crc16(pdu, cmd.pdu_len);
+               crc = fio_crc16(pdu, cmd.pdu_len);
                if (crc != cmd.pdu_crc16) {
                        log_err("fio: server bad crc on payload ");
                        log_err("(got %x, wanted %x)\n", cmd.pdu_crc16, crc);
@@ -238,11 +238,11 @@ void fio_net_cmd_crc(struct fio_net_cmd *cmd)
 {
        uint32_t pdu_len;
 
-       cmd->cmd_crc16 = __cpu_to_le16(crc16(cmd, FIO_NET_CMD_CRC_SZ));
+       cmd->cmd_crc16 = __cpu_to_le16(fio_crc16(cmd, FIO_NET_CMD_CRC_SZ));
 
        pdu_len = le32_to_cpu(cmd->pdu_len);
        if (pdu_len)
-               cmd->pdu_crc16 = __cpu_to_le16(crc16(cmd->payload, pdu_len));
+               cmd->pdu_crc16 = __cpu_to_le16(fio_crc16(cmd->payload, pdu_len));
 }
 
 int fio_net_send_cmd(int fd, uint16_t opcode, const void *buf, off_t size,
index 0a504deb15f2e22ca6ce20a526296cd97102fcb4..5621db2a5b222e2b00afa354382ca38ee84a1cb7 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -389,14 +389,14 @@ static int verify_io_u_sha512(struct verify_header *hdr, struct vcont *vc)
        void *p = io_u_verify_off(hdr, vc);
        struct vhdr_sha512 *vh = hdr_priv(hdr);
        uint8_t sha512[128];
-       struct sha512_ctx sha512_ctx = {
+       struct fio_sha512_ctx sha512_ctx = {
                .buf = sha512,
        };
 
        dprint(FD_VERIFY, "sha512 verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       sha512_init(&sha512_ctx);
-       sha512_update(&sha512_ctx, p, hdr->len - hdr_size(hdr));
+       fio_sha512_init(&sha512_ctx);
+       fio_sha512_update(&sha512_ctx, p, hdr->len - hdr_size(hdr));
 
        if (!memcmp(vh->sha512, sha512_ctx.buf, sizeof(sha512)))
                return 0;
@@ -414,14 +414,14 @@ static int verify_io_u_sha256(struct verify_header *hdr, struct vcont *vc)
        void *p = io_u_verify_off(hdr, vc);
        struct vhdr_sha256 *vh = hdr_priv(hdr);
        uint8_t sha256[64];
-       struct sha256_ctx sha256_ctx = {
+       struct fio_sha256_ctx sha256_ctx = {
                .buf = sha256,
        };
 
        dprint(FD_VERIFY, "sha256 verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       sha256_init(&sha256_ctx);
-       sha256_update(&sha256_ctx, p, hdr->len - hdr_size(hdr));
+       fio_sha256_init(&sha256_ctx);
+       fio_sha256_update(&sha256_ctx, p, hdr->len - hdr_size(hdr));
 
        if (!memcmp(vh->sha256, sha256_ctx.buf, sizeof(sha256)))
                return 0;
@@ -439,14 +439,14 @@ static int verify_io_u_sha1(struct verify_header *hdr, struct vcont *vc)
        void *p = io_u_verify_off(hdr, vc);
        struct vhdr_sha1 *vh = hdr_priv(hdr);
        uint32_t sha1[5];
-       struct sha1_ctx sha1_ctx = {
+       struct fio_sha1_ctx sha1_ctx = {
                .H = sha1,
        };
 
        dprint(FD_VERIFY, "sha1 verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       sha1_init(&sha1_ctx);
-       sha1_update(&sha1_ctx, p, hdr->len - hdr_size(hdr));
+       fio_sha1_init(&sha1_ctx);
+       fio_sha1_update(&sha1_ctx, p, hdr->len - hdr_size(hdr));
 
        if (!memcmp(vh->sha1, sha1_ctx.H, sizeof(sha1)))
                return 0;
@@ -467,7 +467,7 @@ static int verify_io_u_crc7(struct verify_header *hdr, struct vcont *vc)
 
        dprint(FD_VERIFY, "crc7 verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       c = crc7(p, hdr->len - hdr_size(hdr));
+       c = fio_crc7(p, hdr->len - hdr_size(hdr));
 
        if (c == vh->crc7)
                return 0;
@@ -488,7 +488,7 @@ static int verify_io_u_crc16(struct verify_header *hdr, struct vcont *vc)
 
        dprint(FD_VERIFY, "crc16 verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       c = crc16(p, hdr->len - hdr_size(hdr));
+       c = fio_crc16(p, hdr->len - hdr_size(hdr));
 
        if (c == vh->crc16)
                return 0;
@@ -509,7 +509,7 @@ static int verify_io_u_crc64(struct verify_header *hdr, struct vcont *vc)
 
        dprint(FD_VERIFY, "crc64 verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       c = crc64(p, hdr->len - hdr_size(hdr));
+       c = fio_crc64(p, hdr->len - hdr_size(hdr));
 
        if (c == vh->crc64)
                return 0;
@@ -530,7 +530,7 @@ static int verify_io_u_crc32(struct verify_header *hdr, struct vcont *vc)
 
        dprint(FD_VERIFY, "crc32 verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       c = crc32(p, hdr->len - hdr_size(hdr));
+       c = fio_crc32(p, hdr->len - hdr_size(hdr));
 
        if (c == vh->crc32)
                return 0;
@@ -551,7 +551,7 @@ static int verify_io_u_crc32c(struct verify_header *hdr, struct vcont *vc)
 
        dprint(FD_VERIFY, "crc32c verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       c = crc32c(p, hdr->len - hdr_size(hdr));
+       c = fio_crc32c(p, hdr->len - hdr_size(hdr));
 
        if (c == vh->crc32)
                return 0;
@@ -569,14 +569,14 @@ static int verify_io_u_md5(struct verify_header *hdr, struct vcont *vc)
        void *p = io_u_verify_off(hdr, vc);
        struct vhdr_md5 *vh = hdr_priv(hdr);
        uint32_t hash[MD5_HASH_WORDS];
-       struct md5_ctx md5_ctx = {
+       struct fio_md5_ctx md5_ctx = {
                .hash = hash,
        };
 
        dprint(FD_VERIFY, "md5 verify io_u %p, len %u\n", vc->io_u, hdr->len);
 
-       md5_init(&md5_ctx);
-       md5_update(&md5_ctx, p, hdr->len - hdr_size(hdr));
+       fio_md5_init(&md5_ctx);
+       fio_md5_update(&md5_ctx, p, hdr->len - hdr_size(hdr));
 
        if (!memcmp(vh->md5_digest, md5_ctx.hash, sizeof(hash)))
                return 0;
@@ -654,7 +654,7 @@ static int verify_header(struct verify_header *hdr)
        if (hdr->magic != FIO_HDR_MAGIC)
                return 0;
 
-       crc = crc32c(p, offsetof(struct verify_header, crc32));
+       crc = fio_crc32c(p, offsetof(struct verify_header, crc32));
        if (crc == hdr->crc32)
                return 1;
 
@@ -770,80 +770,80 @@ static void fill_meta(struct verify_header *hdr, struct thread_data *td,
 static void fill_sha512(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_sha512 *vh = hdr_priv(hdr);
-       struct sha512_ctx sha512_ctx = {
+       struct fio_sha512_ctx sha512_ctx = {
                .buf = vh->sha512,
        };
 
-       sha512_init(&sha512_ctx);
-       sha512_update(&sha512_ctx, p, len);
+       fio_sha512_init(&sha512_ctx);
+       fio_sha512_update(&sha512_ctx, p, len);
 }
 
 static void fill_sha256(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_sha256 *vh = hdr_priv(hdr);
-       struct sha256_ctx sha256_ctx = {
+       struct fio_sha256_ctx sha256_ctx = {
                .buf = vh->sha256,
        };
 
-       sha256_init(&sha256_ctx);
-       sha256_update(&sha256_ctx, p, len);
+       fio_sha256_init(&sha256_ctx);
+       fio_sha256_update(&sha256_ctx, p, len);
 }
 
 static void fill_sha1(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_sha1 *vh = hdr_priv(hdr);
-       struct sha1_ctx sha1_ctx = {
+       struct fio_sha1_ctx sha1_ctx = {
                .H = vh->sha1,
        };
 
-       sha1_init(&sha1_ctx);
-       sha1_update(&sha1_ctx, p, len);
+       fio_sha1_init(&sha1_ctx);
+       fio_sha1_update(&sha1_ctx, p, len);
 }
 
 static void fill_crc7(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_crc7 *vh = hdr_priv(hdr);
 
-       vh->crc7 = crc7(p, len);
+       vh->crc7 = fio_crc7(p, len);
 }
 
 static void fill_crc16(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_crc16 *vh = hdr_priv(hdr);
 
-       vh->crc16 = crc16(p, len);
+       vh->crc16 = fio_crc16(p, len);
 }
 
 static void fill_crc32(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_crc32 *vh = hdr_priv(hdr);
 
-       vh->crc32 = crc32(p, len);
+       vh->crc32 = fio_crc32(p, len);
 }
 
 static void fill_crc32c(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_crc32 *vh = hdr_priv(hdr);
 
-       vh->crc32 = crc32c(p, len);
+       vh->crc32 = fio_crc32c(p, len);
 }
 
 static void fill_crc64(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_crc64 *vh = hdr_priv(hdr);
 
-       vh->crc64 = crc64(p, len);
+       vh->crc64 = fio_crc64(p, len);
 }
 
 static void fill_md5(struct verify_header *hdr, void *p, unsigned int len)
 {
        struct vhdr_md5 *vh = hdr_priv(hdr);
-       struct md5_ctx md5_ctx = {
+       struct fio_md5_ctx md5_ctx = {
                .hash = (uint32_t *) vh->md5_digest,
        };
 
-       md5_init(&md5_ctx);
-       md5_update(&md5_ctx, p, len);
+       fio_md5_init(&md5_ctx);
+       fio_md5_update(&md5_ctx, p, len);
 }
 
 static void populate_hdr(struct thread_data *td, struct io_u *io_u,
@@ -859,7 +859,7 @@ static void populate_hdr(struct thread_data *td, struct io_u *io_u,
        hdr->verify_type = td->o.verify;
        hdr->len = header_len;
        hdr->rand_seed = io_u->rand_seed;
-       hdr->crc32 = crc32c(p, offsetof(struct verify_header, crc32));
+       hdr->crc32 = fio_crc32c(p, offsetof(struct verify_header, crc32));
 
        data_len = header_len - hdr_size(hdr);