MCPcopy Create free account
hub / github.com/axboe/liburing / handle_cqe

Function handle_cqe

examples/link-cp.c:87–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87static int handle_cqe(struct io_uring *ring, struct io_uring_cqe *cqe)
88{
89 struct io_data *data = io_uring_cqe_get_data(cqe);
90 int ret = 0;
91
92 data->index++;
93
94 if (cqe->res < 0) {
95 if (cqe->res == -ECANCELED) {
96 queue_rw_pair(ring, data->iov.iov_len, data->offset);
97 inflight += 2;
98 } else {
99 printf("cqe error: %s\n", strerror(-cqe->res));
100 ret = 1;
101 }
102 }
103
104 if (data->index == 2)
105 free(data);
106 io_uring_cqe_seen(ring, cqe);
107 return ret;
108}
109
110static int copy_file(struct io_uring *ring, off_t insize)
111{

Callers 1

copy_fileFunction · 0.70

Calls 2

io_uring_cqe_get_dataFunction · 0.85
queue_rw_pairFunction · 0.85

Tested by

no test coverage detected