fio_sha256_init(&sha256_ctx);
fio_sha256_update(&sha256_ctx, p, hdr->len - hdr_size(hdr));
+ fio_sha256_final(&sha256_ctx);
if (!memcmp(vh->sha256, sha256_ctx.buf, sizeof(sha256)))
return 0;
fio_sha1_init(&sha1_ctx);
fio_sha1_update(&sha1_ctx, p, hdr->len - hdr_size(hdr));
+ fio_sha1_final(&sha1_ctx);
if (!memcmp(vh->sha1, sha1_ctx.H, sizeof(sha1)))
return 0;
fio_md5_init(&md5_ctx);
fio_md5_update(&md5_ctx, p, hdr->len - hdr_size(hdr));
+ fio_md5_final(&md5_ctx);
if (!memcmp(vh->md5_digest, md5_ctx.hash, sizeof(hash)))
return 0;
if (io_u->flags & IO_U_F_IN_CUR_DEPTH) {
td->cur_depth--;
- io_u->flags &= ~IO_U_F_IN_CUR_DEPTH;
+ io_u_clear(io_u, IO_U_F_IN_CUR_DEPTH);
}
flist_add_tail(&io_u->verify_list, &td->verify_list);
*io_u_ptr = NULL;
fio_sha256_init(&sha256_ctx);
fio_sha256_update(&sha256_ctx, p, len);
+ fio_sha256_final(&sha256_ctx);
}
static void fill_sha1(struct verify_header *hdr, void *p, unsigned int len)
fio_sha1_init(&sha1_ctx);
fio_sha1_update(&sha1_ctx, p, len);
+ fio_sha1_final(&sha1_ctx);
}
static void fill_crc7(struct verify_header *hdr, void *p, unsigned int len)
fio_md5_init(&md5_ctx);
fio_md5_update(&md5_ctx, p, len);
+ fio_md5_final(&md5_ctx);
}
static void populate_hdr(struct thread_data *td, struct io_u *io_u,
io_u->buflen = ipo->len;
io_u->numberio = ipo->numberio;
io_u->file = ipo->file;
- io_u->flags |= IO_U_F_VER_LIST;
+ io_u_set(io_u, IO_U_F_VER_LIST);
if (ipo->flags & IP_F_TRIMMED)
- io_u->flags |= IO_U_F_TRIMMED;
+ io_u_set(io_u, IO_U_F_TRIMMED);
if (!fio_file_open(io_u->file)) {
int r = td_io_open_file(td, io_u->file);
io_u = flist_first_entry(&list, struct io_u, verify_list);
flist_del_init(&io_u->verify_list);
- io_u->flags |= IO_U_F_NO_FILE_PUT;
+ io_u_set(io_u, IO_U_F_NO_FILE_PUT);
ret = verify_io_u(td, &io_u);
put_io_u(td, io_u);