]> git.baikalelectronics.ru Git - kernel.git/commit
block: properly handle IOCB_NOWAIT for async O_DIRECT IO
authorJens Axboe <axboe@kernel.dk>
Tue, 16 Jul 2019 19:56:42 +0000 (13:56 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 22 Jul 2019 03:46:29 +0000 (21:46 -0600)
commitb0485bcfa05b18727a726f1b622690ac79140e09
treee1781f5c8c89749b67b76157dcc8f57c75a581f1
parente94a4a8389a7bd2565bf7db722181d3e397b37a9
block: properly handle IOCB_NOWAIT for async O_DIRECT IO

A caller is supposed to pass in REQ_NOWAIT if we can't block for any
given operation, but O_DIRECT for block devices just ignore this. Hence
we'll block for various resource shortages on the block layer side,
like having to wait for requests.

Use the new REQ_NOWAIT_INLINE to ask for this error to be returned
inline, so we can handle it appropriately and return -EAGAIN to the
caller.

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