aboutsummaryrefslogtreecommitdiffstats
path: root/io_uring/io_uring.h
diff options
context:
space:
mode:
authorDylan Yudaken <dylany@fb.com>2022-06-30 02:12:25 -0700
committerJens Axboe <axboe@kernel.dk>2022-07-24 18:39:17 -0600
commit114eccdf0e368893b3d92e06e9788d9d94876853 (patch)
treecc69f53bf7375db33e8038566c260363364f42e8 /io_uring/io_uring.h
parent2ba69707d9153eeca1ee8ac1bc55376b88978842 (diff)
downloadlinux-114eccdf0e368893b3d92e06e9788d9d94876853.tar.gz
io_uring: add IOU_STOP_MULTISHOT return code
For multishot we want a way to signal the caller that multishot has ended but also this might not be an error return. For example sockets return 0 when closed, which should end a multishot recv, but still have a CQE with result 0 Introduce IOU_STOP_MULTISHOT which does this and indicates that the return code is stored inside req->cqe Signed-off-by: Dylan Yudaken <dylany@fb.com> Link: https://lore.kernel.org/r/20220630091231.1456789-7-dylany@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.h')
-rw-r--r--io_uring/io_uring.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index f77e4a5403e4e..e8da70781fa34 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -15,6 +15,13 @@
enum {
IOU_OK = 0,
IOU_ISSUE_SKIP_COMPLETE = -EIOCBQUEUED,
+
+ /*
+ * Intended only when both REQ_F_POLLED and REQ_F_APOLL_MULTISHOT
+ * are set to indicate to the poll runner that multishot should be
+ * removed and the result is set on req->cqe.res.
+ */
+ IOU_STOP_MULTISHOT = -ECANCELED,
};
struct io_uring_cqe *__io_get_cqe(struct io_ring_ctx *ctx);