summaryrefslogtreecommitdiff
path: root/io_uring/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-05-24 15:21:00 -0600
committerJens Axboe <axboe@kernel.dk>2022-07-24 18:39:11 -0600
commit97b388d70b53fd7d286ac1b81e5a88bd6af98209 (patch)
tree551082b2ceecde75c2482fab1e22a5e03c40cd46 /io_uring/io_uring.h
parentde23077eda61f549dbdadc4b6aa95f6e7b251552 (diff)
io_uring: handle completions in the core
Normally request handlers complete requests themselves, if they don't return an error. For the latter case, the core will complete it for them. This is unhandy for pushing opcode handlers further out, as we don't want a bunch of inline completion code and we don't want to make the completion path slower than it is now. Let the core handle any completion, unless the handler explicitly asks us not to. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.h')
-rw-r--r--io_uring/io_uring.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index 522e65219757..73943dbe884e 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -4,6 +4,11 @@
#include <linux/errno.h>
#include "io_uring_types.h"
+enum {
+ IOU_OK = 0,
+ IOU_ISSUE_SKIP_COMPLETE = -EIOCBQUEUED,
+};
+
static inline void io_req_set_res(struct io_kiocb *req, s32 res, u32 cflags)
{
req->cqe.res = res;