io_uring: support true async buffered reads, if file provides it async-buffered async-buffered.2
authorJens Axboe <axboe@kernel.dk>
Fri, 22 May 2020 15:24:42 +0000 (09:24 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 23 May 2020 01:30:04 +0000 (19:30 -0600)
commita37584fc66e43e647544db10a8b0ab70643bb91e
treeb6e563f42ae4b30e6cb7309ecf1e9d7a164fc8e3
parentebe71af4d7c3b7d805bb4119710842ba724b8cf0
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