summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-08-12 11:48:15 -0600
committerJens Axboe <axboe@kernel.dk>2020-08-12 11:48:15 -0600
commit84abeef7d9f2f5cded36dcfc127b3f33db89ea57 (patch)
tree79c5fcec00bac9f432233c6f6a4e74cd9b6fa961
parent0d578085cc7b97b783e1719b205dd563b406ecbc (diff)
downloadfio-84abeef7d9f2f5cded36dcfc127b3f33db89ea57.tar.gz
fio-84abeef7d9f2f5cded36dcfc127b3f33db89ea57.tar.bz2
io_u: calculate incremental residuals correctly
We need to use the transfer buffer length for the residual calculation, otherwise multiple shorts on the same IO will not calculate the right value. Fixes: 5fff95436922 ("Add support for >= 4G block sizes") Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_u.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_u.c b/io_u.c
index dbb0a6f8..2ef5acec 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1977,7 +1977,7 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr,
td->last_ddir = ddir;
if (!io_u->error && ddir_rw(ddir)) {
- unsigned long long bytes = io_u->buflen - io_u->resid;
+ unsigned long long bytes = io_u->xfer_buflen - io_u->resid;
int ret;
/*