diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-11-05 12:40:47 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-07 19:12:40 -0700 |
commit | 2665abfd757fb35a241c6f0b1ebf620e3ffb36fb (patch) | |
tree | c485fa90f65c90bbec24f90dcdfcf57d83327a69 /include | |
parent | e977d6d34f0c08e3c3b132c9e73b98d0db50abc1 (diff) |
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')
-rw-r--r-- | include/uapi/linux/io_uring.h | 1 |
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 |