* [PATCH liburing] example/io_uring-test.c: Fix iovecs increment
@ 2019-06-11 13:37 Stephen Bates
2019-06-13 9:05 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Bates @ 2019-06-11 13:37 UTC (permalink / raw)
To: linux-block; +Cc: Jens Axboe
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>
---
examples/io_uring-test.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH liburing] example/io_uring-test.c: Fix iovecs increment
2019-06-11 13:37 [PATCH liburing] example/io_uring-test.c: Fix iovecs increment Stephen Bates
@ 2019-06-13 9:05 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-06-13 9:05 UTC (permalink / raw)
To: Stephen Bates, linux-block
On 6/11/19 7:37 AM, Stephen Bates wrote:
> 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.
I hand applied this patch, it's coming through as encoded. But fix looks
good, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-13 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 13:37 [PATCH liburing] example/io_uring-test.c: Fix iovecs increment Stephen Bates
2019-06-13 9:05 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).