Lines Matching refs:cqe
126 struct io_uring_cqe *cqe; in copy_file() local
174 ret = io_uring_wait_cqe(ring, &cqe); in copy_file()
177 ret = io_uring_peek_cqe(ring, &cqe); in copy_file()
179 cqe = NULL; in copy_file()
188 if (!cqe) in copy_file()
191 data = io_uring_cqe_get_data(cqe); in copy_file()
192 if (cqe->res < 0) { in copy_file()
193 if (cqe->res == -EAGAIN) { in copy_file()
195 io_uring_cqe_seen(ring, cqe); in copy_file()
199 strerror(-cqe->res)); in copy_file()
201 } else if (cqe->res != data->iov.iov_len) { in copy_file()
203 data->iov.iov_base += cqe->res; in copy_file()
204 data->iov.iov_len -= cqe->res; in copy_file()
205 data->offset += cqe->res; in copy_file()
207 io_uring_cqe_seen(ring, cqe); in copy_file()
224 io_uring_cqe_seen(ring, cqe); in copy_file()
232 ret = io_uring_wait_cqe(ring, &cqe); in copy_file()
237 if (cqe->res < 0) { in copy_file()
238 fprintf(stderr, "write res=%d\n", cqe->res); in copy_file()
241 data = io_uring_cqe_get_data(cqe); in copy_file()
244 io_uring_cqe_seen(ring, cqe); in copy_file()