aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2020-09-23 16:06:51 -0400
committerJens Axboe <axboe@kernel.dk>2020-09-25 08:20:03 -0600
commit021a24460dc28e7412aecfae89f60e1847e685c0 (patch)
tree14e5d8d9a110a92135fcb31457a906ca2e85cac3 /block/blk-core.c
parentvsprintf: use bd_partno in bdev_name (diff)
downloadlinux-dev-021a24460dc28e7412aecfae89f60e1847e685c0.tar.xz
linux-dev-021a24460dc28e7412aecfae89f60e1847e685c0.zip
block: add QUEUE_FLAG_NOWAIT
Add QUEUE_FLAG_NOWAIT to allow a block device to advertise support for REQ_NOWAIT. Bio-based devices may set QUEUE_FLAG_NOWAIT where applicable. Update QUEUE_FLAG_MQ_DEFAULT to include QUEUE_FLAG_NOWAIT. Also update submit_bio_checks() to verify it is set for REQ_NOWAIT bios. Reported-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Suggested-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 1cc4fa6bc7fe..4884f1e7451b 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -814,9 +814,9 @@ static noinline_for_stack bool submit_bio_checks(struct bio *bio)
/*
* For a REQ_NOWAIT based request, return -EOPNOTSUPP
- * if queue is not a request based queue.
+ * if queue does not support NOWAIT.
*/
- if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q))
+ if ((bio->bi_opf & REQ_NOWAIT) && !blk_queue_nowait(q))
goto not_supported;
if (should_fail_bio(bio))