X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=verify.c;h=43520bd398992d7292294df13d782917b1e77272;hp=12eb7c984f01c4f25d99347c0e0d0b554fc1fecc;hb=75e6f36fae06978f29296fce76a7f00ca0df7b56;hpb=e29d1b70a21e29801fb35dfbc1b236b7c8514055 diff --git a/verify.c b/verify.c index 12eb7c98..43520bd3 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; @@ -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; +}