- offset = vc->io_u->offset;
- offset += vc->hdr_num * hdr->len;
- log_err("%.8s: verify failed at file %s offset %llu, length %u\n",
- vc->name, vc->io_u->file->file_name, offset, hdr->len);
+ offset = vc->io_u->verify_offset;
+ if (td->o.verify != VERIFY_PATTERN_NO_HDR) {
+ len = hdr->len;
+ offset += (unsigned long long) 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, len,
+ vc->io_u->verify_offset, vc->io_u->buflen, vc->io_u->flags);