aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-11-05 12:40:47 -0700
committerJens Axboe <axboe@kernel.dk>2019-11-07 19:12:40 -0700
commit2665abfd757fb35a241c6f0b1ebf620e3ffb36fb (patch)
treec485fa90f65c90bbec24f90dcdfcf57d83327a69 /include/uapi
parentio_uring: abstract out io_async_cancel_one() helper (diff)
downloadlinux-dev-2665abfd757fb35a241c6f0b1ebf620e3ffb36fb.tar.xz
linux-dev-2665abfd757fb35a241c6f0b1ebf620e3ffb36fb.zip
io_uring: add support for linked SQE timeouts
While we have support for generic timeouts, we don't have a way to tie a timeout to a specific SQE. The generic timeouts simply trigger wakeups on the CQ ring. This adds support for IORING_OP_LINK_TIMEOUT. This command is only valid as a link to a previous command. The timeout specific can be either relative or absolute, following the same rules as IORING_OP_TIMEOUT. If the timeout triggers before the dependent command completes, it will attempt to cancel that command. Likewise, if the dependent command completes before the timeout triggers, it will cancel the timeout. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/io_uring.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 6877cf8894db..f1a118b01d18 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -72,6 +72,7 @@ struct io_uring_sqe {
#define IORING_OP_TIMEOUT_REMOVE 12
#define IORING_OP_ACCEPT 13
#define IORING_OP_ASYNC_CANCEL 14
+#define IORING_OP_LINK_TIMEOUT 15
/*
* sqe->fsync_flags