X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=verify.c;h=c0485d55bf268563a5bc760bede3333f7a58e8e6;hp=f246dc8f9ba0cfe3f4a9e2b43316f398b75cb4b1;hb=e6c4d732fc99070091367d0ce41fe2cf1ddd1dc9;hpb=8b28bd41375930664a0ff9ff9b101a88ac416ac5 diff --git a/verify.c b/verify.c index f246dc8f..c0485d55 100644 --- a/verify.c +++ b/verify.c @@ -690,6 +690,7 @@ int verify_io_u(struct thread_data *td, struct io_u *io_u) .hdr_num = hdr_num, .td = td, }; + unsigned int verify_type; if (ret && td->o.verify_fatal) break; @@ -708,7 +709,12 @@ int verify_io_u(struct thread_data *td, struct io_u *io_u) return EILSEQ; } - switch (hdr->verify_type) { + if (td->o.verify != VERIFY_NONE) + verify_type = td->o.verify; + else + verify_type = hdr->verify_type; + + switch (verify_type) { case VERIFY_MD5: ret = verify_io_u_md5(hdr, &vc); break; @@ -747,6 +753,10 @@ int verify_io_u(struct thread_data *td, struct io_u *io_u) log_err("Bad verify type %u\n", hdr->verify_type); ret = EINVAL; } + + if (ret && verify_type != hdr->verify_type) + log_err("fio: verify type mismatch (%u media, %u given)\n", + hdr->verify_type, verify_type); } done: