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>
Sat, 23 May 2020 14:26:07 +0000 (08:26 -0600)
commit12b9e99ac7b8d5e7956785b66c86b18f439c0308
treeb5f63cd8e077a3e5c62918dc7e6d7b34dd46f6c9
parente097beda49b559dbdab0096f88a2bb23c37b935d
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.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
mm/filemap.c