]> git.hungrycats.org Git - linux/commit
io_uring: Fix broken links with offloading
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 25 Oct 2019 09:31:30 +0000 (12:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2019 08:22:29 +0000 (09:22 +0100)
commit2df35e87786952031ffdbd5e22828c7790102c7b
treeea845f82d06c0e4f49002d5810b22925d16e1ea0
parent02a908123161ce81fa95620ed405d3f99374f7b0
io_uring: Fix broken links with offloading

[ Upstream commit fb5ccc98782f654778cb8d96ba8a998304f9a51f ]

io_sq_thread() processes sqes by 8 without considering links. As a
result, links will be randomely subdivided.

The easiest way to fix it is to call io_get_sqring() inside
io_submit_sqes() as do io_ring_submit().

Downsides:
1. This removes optimisation of not grabbing mm_struct for fixed files
2. It submitting all sqes in one go, without finer-grained sheduling
with cq processing.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c