io_uring: support true async buffered reads, if file provides it
authorJens Axboe <axboe@kernel.dk>
Fri, 22 May 2020 15:24:42 +0000 (09:24 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 28 May 2020 19:24:09 +0000 (13:24 -0600)
commitb360d424ce02f5ff1594e50342abb471da74e39e
tree6f992c7f0328e7c832e2f1db823d30aeb1a67806
parent731ce781bf06e719098e371f2a8eec480c958ae2
io_uring: support true async buffered reads, if file provides it

If the file is flagged with FMODE_BUF_RASYNC, then we don't have to punt
the buffered read to an io-wq worker. Instead we can rely on page
unlocking callbacks to support retry based async IO. This is a lot more
efficient than doing async thread offload.

The retry is done similarly to how we handle poll based retry. From
the unlock callback, we simply queue the retry to a task_work based
handler.

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