Skip to content

Commit

Permalink
verify: Fix the bad pattern block offset value
Browse files Browse the repository at this point in the history
We offset buf by header_size for pattern verification. Add header_size
to the mismatched buf offset to get the correct block offset value.

Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
  • Loading branch information
ipylypiv committed Sep 28, 2023
1 parent 996ac91 commit 242c63d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ static int verify_io_u_pattern(struct verify_header *hdr, struct vcont *vc)
(unsigned char)buf[i],
(unsigned char)pattern[mod],
bits);
log_err("fio: bad pattern block offset %u\n", i);
log_err("fio: bad pattern block offset %u\n",
i + header_size);
vc->name = "pattern";
log_verify_failure(hdr, vc);
return EILSEQ;
Expand Down

0 comments on commit 242c63d

Please sign in to comment.