]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring: pre-calculate scq layout
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 12 Nov 2025 12:45:58 +0000 (12:45 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Nov 2025 14:27:34 +0000 (07:27 -0700)
commiteb76ff6a6829a9a54a385804cc9dbe4460f156d6
tree397951b6fe2ca417a45a1ef1da03be3501ec0182
parent001b76b7e755767d847e9aebf1fd6e525f1e58c8
io_uring: pre-calculate scq layout

Move ring layouts calculations into io_prepare_config(), so that more
misconfiguration checking can be done earlier before creating a ctx.
It also deduplicates some code with ring resizing. And as a bonus, now
it initialises params->sq_off.array, which is closer to all other user
offset init, and also applies it to ring resizing, which was previously
missing it.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/io_uring.h
io_uring/register.c