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, 22 Jun 2020 02:44:25 +0000 (20:44 -0600)
commit1a0a7853b901c35a742b3bf176cf4701a5c5817c
tree57a6b2a9b92eb001d8d5854868a16a88f8171f8f
parentdd3e6d5039de1cbff4e20e2b34390ff44cdb182f
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