summaryrefslogtreecommitdiff
path: root/include/uapi/linux/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-11-05 22:40:47 +0300
committerJens Axboe <axboe@kernel.dk>2019-11-08 05:12:40 +0300
commit2665abfd757fb35a241c6f0b1ebf620e3ffb36fb (patch)
treec485fa90f65c90bbec24f90dcdfcf57d83327a69 /include/uapi/linux/io_uring.h
parente977d6d34f0c08e3c3b132c9e73b98d0db50abc1 (diff)
downloadlinux-2665abfd757fb35a241c6f0b1ebf620e3ffb36fb.tar.xz
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/linux/io_uring.h')
-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