[PATCH liburing] example/io_uring-test.c: Fix iovecs increment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
 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
 





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux