From: Jens Axboe Date: Tue, 11 Aug 2020 02:53:55 +0000 (-0600) Subject: io_u: reset ->resid on starting a requeue IO X-Git-Tag: fio-3.22~13 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=bba6b14f3588fd21e6181c0c9194d8f95533aff6;p=fio.git io_u: reset ->resid on starting a requeue IO We only clear this state for a new IO, we should also do it for starting a requeued IO. Signed-off-by: Jens Axboe --- diff --git a/io_u.c b/io_u.c index 6a729e51..667530c0 100644 --- a/io_u.c +++ b/io_u.c @@ -1564,9 +1564,10 @@ struct io_u *__get_io_u(struct thread_data *td) __td_io_u_lock(td); again: - if (!io_u_rempty(&td->io_u_requeues)) + if (!io_u_rempty(&td->io_u_requeues)) { io_u = io_u_rpop(&td->io_u_requeues); - else if (!queue_full(td)) { + io_u->resid = 0; + } else if (!queue_full(td)) { io_u = io_u_qpop(&td->io_u_freelist); io_u->file = NULL;