io_u: get_next_offset() should always set io_u->verify_offset
authorJens Axboe <axboe@kernel.dk>
Tue, 11 Aug 2020 03:31:01 +0000 (21:31 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Aug 2020 03:31:01 +0000 (21:31 -0600)
Don't assume that the original get_next_block() is the only place
that sets it. Set it unconditionally at the success exit path
of get_next_offset().

Fixes: 4fff54ccba73 ("verify: use origina offset for verification")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_u.c

diff --git a/io_u.c b/io_u.c
index d8d60e052327cb15771937ea7c5249c163be47c1..d54cf2fb84617b504a5370e33ba347df310f5549 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -507,6 +507,7 @@ static int get_next_offset(struct thread_data *td, struct io_u *io_u,
                return 1;
        }
 
+       io_u->verify_offset = io_u->offset;
        return 0;
 }