summaryrefslogtreecommitdiff
path: root/examples/io_uring-test.c
diff options
context:
space:
mode:
authorStephen Bates <sbates@raithlin.com>2019-06-13 03:04:32 -0600
committerJens Axboe <axboe@kernel.dk>2019-06-13 03:04:32 -0600
commit733223acd6540cc38d7e0b1235f74b42d643b138 (patch)
tree5e2f0f371e6fff7ea2226cee8ffd91b3069f31d2 /examples/io_uring-test.c
parent91dde5c956b1af491bc6c16ee230daa4b4b66706 (diff)
example/io_uring-test.c: Fix iovecs increment
This example misses an increment though the iovecs array. This causes the same buffer to be filled from the block device every time. It would be good to fix this since it is one of the first examples a new-comer to io_uring is exposed too. Signed-off-by: Stephen Bates <sbates@raithlin.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'examples/io_uring-test.c')
-rw-r--r--examples/io_uring-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/io_uring-test.c b/examples/io_uring-test.c
index bbac3a7..0b975ad 100644
--- a/examples/io_uring-test.c
+++ b/examples/io_uring-test.c
@@ -56,6 +56,7 @@ int main(int argc, char *argv[])
break;
io_uring_prep_readv(sqe, fd, &iovecs[i], 1, offset);
offset += iovecs[i].iov_len;
+ i++;
} while (1);
ret = io_uring_submit(&ring);