summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/io_uring-cp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/io_uring-cp.c b/test/io_uring-cp.c
index e129d84..3790736 100644
--- a/test/io_uring-cp.c
+++ b/test/io_uring-cp.c
@@ -154,8 +154,7 @@ static int copy_file(struct io_uring *ring, off_t insize)
}
/*
- * read queue full, get at least one completion and queue up
- * a write
+ * Queue is full at this point. Find at least one completion.
*/
got_comp = 0;
while (write_left) {
@@ -184,6 +183,7 @@ static int copy_file(struct io_uring *ring, off_t insize)
strerror(-cqe->res));
return 1;
} else if (cqe->res != data->iov.iov_len) {
+ /* Short read/write, adjust and requeue */
data->iov.iov_base += cqe->res;
data->iov.iov_len -= cqe->res;
data->offset += cqe->res;