io_uring: split work handling part of SQPOLL into helper
authorJens Axboe <axboe@kernel.dk>
Mon, 14 Sep 2020 17:07:26 +0000 (11:07 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Oct 2020 02:32:33 +0000 (20:32 -0600)
commitc8d1ba583fe67c6b5e054d89f1433498a924286f
tree9084b57baac94b201e831aa3d54088db1ac90353
parent3f0e64d054114b725569c2481bbc6a8eb538bf15
io_uring: split work handling part of SQPOLL into helper

This is done in preparation for handling more than one ctx, but it also
cleans up the code a bit since io_sq_thread() was a bit too unwieldy to
get a get overview on.

__io_sq_thread() is now the main handler, and it returns an enum sq_ret
that tells io_sq_thread() what it ended up doing. The parent then makes
a decision on idle, spinning, or work handling based on that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c