diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-04-18 19:44:02 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-25 03:18:18 +0300 |
commit | 970f256edb8c1259c8ed48d52b38215135396126 (patch) | |
tree | 2e7c29aac5efd17b3be8b61fc5f6dfdd3f3dde5b /include/uapi/linux/io_uring.h | |
parent | 4bf94615b8886305199ed5755cb72fea88258d15 (diff) | |
download | linux-970f256edb8c1259c8ed48d52b38215135396126.tar.xz |
io_uring: add support for IORING_ASYNC_CANCEL_ANY
Rather than match on a specific key, be it user_data or file, allow
canceling any request that we can lookup. Works like
IORING_ASYNC_CANCEL_ALL in that it cancels multiple requests, but it
doesn't key off user_data or the file.
Can't be set with IORING_ASYNC_CANCEL_FD, as that's a key selector.
Only one may be used at the time.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20220418164402.75259-6-axboe@kernel.dk
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index cc7fe82a1798..980d82eb196e 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -193,9 +193,11 @@ enum { * IORING_ASYNC_CANCEL_ALL Cancel all requests that match the given key * IORING_ASYNC_CANCEL_FD Key off 'fd' for cancelation rather than the * request 'user_data' + * IORING_ASYNC_CANCEL_ANY Match any request */ #define IORING_ASYNC_CANCEL_ALL (1U << 0) #define IORING_ASYNC_CANCEL_FD (1U << 1) +#define IORING_ASYNC_CANCEL_ANY (1U << 2) /* * IO completion data structure (Completion Queue Entry) |