]> 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)
commit2a7a7a1bd49112c5f3c9c2c531275508673fee48
tree416f0b2c00bef21e5bfcc54ca58dae73a470529f
parent6e1059d917d3285cfd884e264bd561ab8513292e
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