Skip to content

Commit

Permalink
block: clear REQ_HIPRI if polling is not supported
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and axboe committed Dec 16, 2018
1 parent d6a51a9 commit d04c406
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d04c406

Please sign in to comment.