OSDN Git Service

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>
Mon, 22 Jul 2019 03:46:23 +0000 (21:46 -0600)
commit893a1c97205a3ece0cbb3f571a3b972080f3b4c7
tree9173a99e83a6842a89b07fb7eeb26e816a0c8faa
parentc0e48f9dea9129aa11bec3ed13803bcc26e96e49
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