diff options
author | Mingqiang Sun <mingqiang.sun@esgyn.cn> | 2022-01-28 22:06:07 +0800 |
---|---|---|
committer | Mingqiang Sun <mingqiang.sun@esgyn.cn> | 2022-01-28 22:06:07 +0800 |
commit | 8ee5cf229151d6dd7cf4934f4b4e31688302ab81 (patch) | |
tree | 7f73b2c3b3604ef4e2f360d9a0abd1c35cc8c115 | |
parent | ffb473d2fe12dfb2d4ad624774ac19017f2bb071 (diff) | |
download | liburing-8ee5cf229151d6dd7cf4934f4b4e31688302ab81.tar.gz liburing-8ee5cf229151d6dd7cf4934f4b4e31688302ab81.tar.bz2 |
examples/link-cp.c: fix the last file-block retry may overflow
Signed-off-by: Mingqiang Sun <mingqiang.sun@esgyn.cn>
-rw-r--r-- | examples/link-cp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/link-cp.c b/examples/link-cp.c index 244d21a..018124e 100644 --- a/examples/link-cp.c +++ b/examples/link-cp.c @@ -95,7 +95,7 @@ static int handle_cqe(struct io_uring *ring, struct io_uring_cqe *cqe) if (cqe->res < 0) { if (cqe->res == -ECANCELED) { - queue_rw_pair(ring, BS, data->offset); + queue_rw_pair(ring, data->iov.iov_len, data->offset); inflight += 2; } else { printf("cqe error: %s\n", strerror(-cqe->res)); |