summaryrefslogtreecommitdiff
path: root/io_uring/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-01-29 21:57:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-16 21:10:56 +0300
commit7cbd3aa59db5baa761fb7c401abe1f379e5115a0 (patch)
treed5b529488652ac9a956d2d56db44200f59f16710 /io_uring/io_uring.h
parenteac52bfe2333acb382cf03db5186587ee96eda4a (diff)
downloadlinux-7cbd3aa59db5baa761fb7c401abe1f379e5115a0.tar.xz
io_uring/poll: add requeue return code from poll multishot handling
Commit 704ea888d646cb9d715662944cf389c823252ee0 upstream. Since our poll handling is edge triggered, multishot handlers retry internally until they know that no more data is available. In preparation for limiting these retries, add an internal return code, IOU_REQUEUE, which can be used to inform the poll backend about the handler wanting to retry, but that this should happen through a normal task_work requeue rather than keep hammering on the issue side for this one request. No functional changes in this patch, nobody is using this return code just yet. Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 d2bad1df347d..c8cba7831083 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -31,6 +31,13 @@ enum {
IOU_ISSUE_SKIP_COMPLETE = -EIOCBQUEUED,
/*
+ * Requeue the task_work to restart operations on this request. The
+ * actual value isn't important, should just be not an otherwise
+ * valid error code, yet less than -MAX_ERRNO and valid internally.
+ */
+ IOU_REQUEUE = -3072,
+
+ /*
* Intended only when both IO_URING_F_MULTISHOT is passed
* to indicate to the poll runner that multishot should be
* removed and the result is set on req->cqe.res.