io_uring: don't vmap single page regions
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 8 Dec 2024 21:46:01 +0000 (21:46 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Dec 2024 13:58:15 +0000 (06:58 -0700)
commit56c71fe7f3016524da2edc816f5c95446f543b04
treef7c1373f07061e19cf556d5e8bb02376cd884035
parent02a6a5eb597da047d684973f4254a09187d951af
io_uring: don't vmap single page regions

When io_check_coalesce_buffer() meets a single page buffer it bails out
and tells that it can be coalesced. That's fine for registered buffers
as io_coalesce_buffer() wouldn't change anything, but the region code
now uses the function to decided on whether to vmap the buffer or not.

Report that a single page buffer is trivially coalescable and let
io_sqe_buffer_register() to filter them.

Fixes: cc2f1a864c27a ("io_uring/memmap: optimise single folio regions")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/cb83e053f318857068447d40c95becebcd8aeced.1733689833.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c