]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: allow disabling rings during the creation
authorStefano Garzarella <sgarzare@redhat.com>
Thu, 27 Aug 2020 14:58:31 +0000 (16:58 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Oct 2020 02:32:33 +0000 (20:32 -0600)
commit62638771c9f101c091792a12e24c305c89d3414b
tree416f0b2c00bef21e5bfcc54ca58dae73a470529f
parentb33b0c744f4e270213492f79b479611f1dafe82c
io_uring: allow disabling rings during the creation

This patch adds a new IORING_SETUP_R_DISABLED flag to start the
rings disabled, allowing the user to register restrictions,
buffers, files, before to start processing SQEs.

When IORING_SETUP_R_DISABLED is set, SQE are not processed and
SQPOLL kthread is not started.

The restrictions registration are allowed only when the rings
are disable to prevent concurrency issue while processing SQEs.

The rings can be enabled using IORING_REGISTER_ENABLE_RINGS
opcode with io_uring_register(2).

Suggested-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h