From: Jens Axboe Date: Fri, 5 Jan 2018 20:38:40 +0000 (-0700) Subject: verify: don't adjust verification length based on interval when unaligned X-Git-Tag: fio-3.4~27 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=57a61cd0e4c5f131cfe75587d8b995191d87ba57;hp=18aa1998aa8267b8a127b3fe53e58a68b4e99469 verify: don't adjust verification length based on interval when unaligned It's perfectly fine to have a verification length that exceeds the default verify interval when we have unaligned block sizes and using block size ranges, since the verify interval just defaults to the smallest blocksize. Fixes: https://github.com/axboe/fio/issues/509 Signed-off-by: Jens Axboe --- diff --git a/verify.c b/verify.c index 2faeaad6..b1784507 100644 --- a/verify.c +++ b/verify.c @@ -87,8 +87,13 @@ static unsigned int get_hdr_inc(struct thread_data *td, struct io_u *io_u) { unsigned int hdr_inc; + /* + * If we use bs_unaligned, buflen can be larger than the verify + * interval (which just defaults to the smallest blocksize possible). + */ hdr_inc = io_u->buflen; - if (td->o.verify_interval && td->o.verify_interval <= io_u->buflen) + if (td->o.verify_interval && td->o.verify_interval <= io_u->buflen && + !td->o.bs_unaligned) hdr_inc = td->o.verify_interval; return hdr_inc; @@ -1175,7 +1180,6 @@ static void fill_hdr(struct thread_data *td, struct io_u *io_u, struct verify_header *hdr, unsigned int header_num, unsigned int header_len, uint64_t rand_seed) { - if (td->o.verify != VERIFY_PATTERN_NO_HDR) __fill_hdr(td, io_u, hdr, header_num, header_len, rand_seed); }