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>
Thu, 18 Jun 2020 14:40:50 +0000 (08:40 -0600)
commit058a395343bff0062606e6be45c04a1101e01190
treed127c2c3118ad1d37a1bfc31a8323490298c2885
parent1e360f81f0a9b5cba5bd997e471268e8e7eb0e5b
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