io_uring: support true async buffered reads, if file provides it async-buffered.3
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 14:26:46 +0000 (08:26 -0600)
commit2d292c1a04db7dc03511822a037600aff360b746
tree0cb9e5297be87c5117b3b566159e4b1f4380cb1f
parent493ce66a93cbdd6d3acc75b0da8abf7e03c8bfb1
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