blk-mq: allow REQ_NOWAIT to return an error inline
authorJens Axboe <axboe@kernel.dk>
Tue, 16 Jul 2019 19:55:23 +0000 (13:55 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 17 Jul 2019 20:00:12 +0000 (14:00 -0600)
commite0cc142d5c5cc7a2161b044b2da5b0ef38534d83
tree79e321a9c1a1cd658368336527d3bd128bdcb4e4
parentbcabeeb875c693d61064f4f2a8dca17f35edd619
blk-mq: allow REQ_NOWAIT to return an error inline

By default, if a caller sets REQ_NOWAIT and we need to block, we'll
return -EAGAIN through the bio->bi_end_io() callback. For some use
cases, this makes it hard to use.

Allow a caller to ask for inline return of errors related to
blocking by also setting REQ_NOWAIT_INLINE.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
include/linux/blk_types.h