From: Oleg Krasnov Date: Sun, 28 Jan 2024 18:24:02 +0000 (+0000) Subject: fix wrong offset for VERIFY_PATTERN_NO_HDR X-Git-Tag: fio-3.37~51^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=9c8b90ae8be24856c4da309d005cc5e31a68ee8f;p=fio.git fix wrong offset for VERIFY_PATTERN_NO_HDR --- diff --git a/verify.c b/verify.c index 78f333e6..3e029443 100644 --- a/verify.c +++ b/verify.c @@ -338,12 +338,20 @@ static void dump_verify_buffers(struct verify_header *hdr, struct vcont *vc) static void log_verify_failure(struct verify_header *hdr, struct vcont *vc) { unsigned long long offset; + uint32_t len; + struct thread_data *td = vc->td; offset = vc->io_u->verify_offset; - offset += vc->hdr_num * hdr->len; + if (td->o.verify != VERIFY_PATTERN_NO_HDR) { + len = hdr->len; + offset += vc->hdr_num * len; + } else { + len = vc->io_u->buflen; + } + log_err("%.8s: verify failed at file %s offset %llu, length %u" " (requested block: offset=%llu, length=%llu, flags=%x)\n", - vc->name, vc->io_u->file->file_name, offset, hdr->len, + vc->name, vc->io_u->file->file_name, offset, len, vc->io_u->verify_offset, vc->io_u->buflen, vc->io_u->flags); if (vc->good_crc && vc->bad_crc) {