io_u: fix negative offset due to wrap
authorJens Axboe <axboe@kernel.dk>
Tue, 10 Jul 2018 19:06:38 +0000 (13:06 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Jul 2018 19:06:38 +0000 (13:06 -0600)
commit04bc85a130c5dbe25dafe5fa5084c5bdcf63844a
treeadf64b732f5f5084fe37ab2a6ce9f01e0660f986
parent19a8064ef4a2a826ee06ed061af970d1737cf840
io_u: fix negative offset due to wrap

If we do wrap, the math is off and we end up wrapping a 64-bit
value. Instead reset to the initial offset.

Reported-by: Bart Van Assche <Bart.VanAssche@wdc.com>
Fixes: 4c8be5b1569f ("Fix bug with zone and zone skipping and io_limit")
Fixes: 224b3093cc21 ("Fix zoning issue with seq-io and randommap issue")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_u.c