block: clear REQ_HIPRI if polling is not supported
authorChristoph Hellwig <hch@lst.de>
Fri, 14 Dec 2018 16:21:22 +0000 (17:21 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 16 Dec 2018 16:01:38 +0000 (09:01 -0700)
This prevents a HIPRI bio from being submitted through a stacking
driver that does not support polling and thus won't poll for I/O
completion.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c

index fa661ba..c780429 100644 (file)
@@ -921,6 +921,9 @@ generic_make_request_checks(struct bio *bio)
                }
        }
 
+       if (!test_bit(QUEUE_FLAG_POLL, &q->queue_flags))
+               bio->bi_opf &= ~REQ_HIPRI;
+
        switch (bio_op(bio)) {
        case REQ_OP_DISCARD:
                if (!blk_queue_discard(q))