In readwrite mode if specified io_size > size, offsets can overlap. This will result in verify errors. Add check to handle this case. Fixes: d782b76f ("Don break too early in readwrite mode") Signed-off-by: Ankit Kumar <ankit.kumar@xxxxxxxxxxx> --- backend.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index f5cfffdb..b75eea80 100644 --- a/backend.c +++ b/backend.c @@ -978,8 +978,11 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done) if (td_write(td) && td_random(td) && td->o.norandommap) total_bytes = max(total_bytes, (uint64_t) td->o.io_size); - /* Don't break too early if io_size > size */ - if (td_rw(td) && !td_random(td)) + /* + * Don't break too early if io_size > size. The exception is when + * verify is enabled. + */ + if (td_rw(td) && !td_random(td) && td->o.verify == VERIFY_NONE) total_bytes = max(total_bytes, (uint64_t)td->o.io_size); /* -- 2.25.1