diff options
| author | 2022-04-18 10:44:00 -0600 | |
|---|---|---|
| committer | 2022-04-24 18:18:18 -0600 | |
| commit | 8e29da69feade64ec7fe9e1a2824b967c5183a21 (patch) | |
| tree | e4d7fdcfeeafcd3b32b7b66ee8289d534d68d7ae /include | |
| parent | io_uring: pass in struct io_cancel_data consistently (diff) | |
| download | linux-dev-8e29da69feade64ec7fe9e1a2824b967c5183a21.tar.xz linux-dev-8e29da69feade64ec7fe9e1a2824b967c5183a21.zip | |
io_uring: add support for IORING_ASYNC_CANCEL_ALL
The current cancelation will lookup and cancel the first request it
finds based on the key passed in. Add a flag that allows to cancel any
request that matches they key. It completes with the number of requests
found and canceled, or res < 0 if an error occured.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20220418164402.75259-4-axboe@kernel.dk
Diffstat (limited to 'include')
| -rw-r--r-- | include/uapi/linux/io_uring.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 1845cf7c80ba..476e58a2837f 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -188,6 +188,13 @@ enum { #define IORING_POLL_UPDATE_USER_DATA (1U << 2) /* + * ASYNC_CANCEL flags. + * + * IORING_ASYNC_CANCEL_ALL Cancel all requests that match the given key + */ +#define IORING_ASYNC_CANCEL_ALL (1U << 0) + +/* * IO completion data structure (Completion Queue Entry) */ struct io_uring_cqe { |
