io_uring: add timeout update

Support timeout updates through IORING_OP_TIMEOUT_REMOVE with passed in
IORING_TIMEOUT_UPDATE. Updates doesn't support offset timeout mode.
Oirignal timeout.off will be ignored as well.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
[axboe: remove now unused 'ret' variable]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Pavel Begunkov
2020-11-30 19:11:16 +00:00
committed by Jens Axboe
parent fbd15848f3
commit 9c8e11b36c
2 changed files with 51 additions and 4 deletions

View File

@@ -151,6 +151,7 @@ enum {
* sqe->timeout_flags
*/
#define IORING_TIMEOUT_ABS (1U << 0)
#define IORING_TIMEOUT_UPDATE (1U << 1)
/*
* sqe->splice_flags