diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-07-12 23:52:42 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-25 03:41:07 +0300 |
commit | bc24d6bd32df0be19df3d30e74be4ba56493c0e2 (patch) | |
tree | 5eb3dd69a67f4eb5f256ec5e9253c16ab72c462b /io_uring/io_uring.c | |
parent | 68ef5578efc8893489400b1ec30af66dab4f75ff (diff) | |
download | linux-bc24d6bd32df0be19df3d30e74be4ba56493c0e2.tar.xz |
io_uring: add notification slot registration
Let the userspace to register and unregister notification slots.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/a0aa8161fe3ebb2a4cc6e5dbd0cffb96e6881cf5.1657643355.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r-- | io_uring/io_uring.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 20e65d45ca1c..cae11374456e 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -3870,6 +3870,15 @@ static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode, break; ret = io_register_file_alloc_range(ctx, arg); break; + case IORING_REGISTER_NOTIFIERS: + ret = io_notif_register(ctx, arg, nr_args); + break; + case IORING_UNREGISTER_NOTIFIERS: + ret = -EINVAL; + if (arg || nr_args) + break; + ret = io_notif_unregister(ctx); + break; default: ret = -EINVAL; break; |