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>
Mon, 1 Jun 2020 17:17:07 +0000 (11:17 -0600)
commit9b1d8c571b95de5be0a7ec614624a687758a6d87
treeecc8d8571167b358998f435c46e329d59486df56
parent01ab4e495d6b27e2da71d908d39edaecd3df2b7f
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