X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=verify.c;h=692eb5baeb17161f8d137b539fa0cfa094833e6b;hp=12eb7c984f01c4f25d99347c0e0d0b554fc1fecc;hb=3951414db33cb12656d218156274d619271421f9;hpb=e29d1b70a21e29801fb35dfbc1b236b7c8514055 diff --git a/verify.c b/verify.c index 12eb7c98..692eb5ba 100644 --- a/verify.c +++ b/verify.c @@ -78,7 +78,7 @@ static int verify_io_u_md5(struct verify_header *hdr, struct io_u *io_u) return 0; } -int verify_io_u(struct io_u *io_u) +static int verify_io_u(struct io_u *io_u) { struct verify_header *hdr = (struct verify_header *) io_u->buf; int ret; @@ -91,7 +91,7 @@ int verify_io_u(struct io_u *io_u) else if (hdr->verify_type == VERIFY_CRC32) ret = verify_io_u_crc32(hdr, io_u); else { - log_err("Bad verify type %d\n", hdr->verify_type); + log_err("Bad verify type %u\n", hdr->verify_type); ret = 1; } @@ -155,3 +155,17 @@ int get_next_verify(struct thread_data *td, struct io_u *io_u) return 1; } + +int do_io_u_verify(struct thread_data *td, struct io_u **io_u) +{ + struct io_u *v_io_u = *io_u; + int ret = 0; + + if (v_io_u) { + ret = verify_io_u(v_io_u); + put_io_u(td, v_io_u); + *io_u = NULL; + } + + return ret; +}