summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-08-10 20:53:55 -0600
committerJens Axboe <axboe@kernel.dk>2020-08-10 20:53:55 -0600
commitbba6b14f3588fd21e6181c0c9194d8f95533aff6 (patch)
tree92bc2e71715a1533389a98090e404045df292a81
parent832faaafd3de59ebdb31043c04316ddbf0b95ad9 (diff)
downloadfio-bba6b14f3588fd21e6181c0c9194d8f95533aff6.tar.gz
fio-bba6b14f3588fd21e6181c0c9194d8f95533aff6.tar.bz2
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 <axboe@kernel.dk>
-rw-r--r--io_u.c5
1 files changed, 3 insertions, 2 deletions
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;