mm: support async buffered reads in generic_file_buffered_read()
authorJens Axboe <axboe@kernel.dk>
Fri, 22 May 2020 15:18:38 +0000 (09:18 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Jun 2020 17:16:45 +0000 (11:16 -0600)
commit8aa080e488fe3b9131e9acd09f665cb8e66d719e
tree7844d8345a7a21fda192fc193aa450b61b568e07
parentc22f9398be18061c54c684b0d53b962739b0b9db
mm: support async buffered reads in generic_file_buffered_read()

Use the async page locking infrastructure, if IOCB_WAITQ is set in the
passed in iocb. The caller must expect an -EIOCBQUEUED return value,
which means that IO is started but not done yet. This is similar to how
O_DIRECT signals the same operation. Once the callback is received by
the caller for IO completion, the caller must retry the operation.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
mm/filemap.c