io_uring: Fix broken links with offloading
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 25 Oct 2019 09:31:30 +0000 (12:31 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Oct 2019 15:01:59 +0000 (09:01 -0600)
commitfb5ccc98782f654778cb8d96ba8a998304f9a51f
tree70b840cd5ee423a968d1a4232d11e44890c4bbba
parent84d55dc5b9e57b513a702fbc358e1b5489651590
io_uring: Fix broken links with offloading

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>
fs/io_uring.c