Skip to contentSkip to conversation

block: clear REQ_HIPRI if polling is not supported

PATCH Applied Christoph Hellwig 2 participants 2 messages Dec 14, 2018 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: clear REQ_HIPRI if polling is not supported

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.

---
 block/blk-core.c | 3 +++
 1 file changed, 3 insertions(+)
block/blk-core.c +3 -0
index 268d2b8e9843..efa10789ddc0 100644
@@ -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))
Signature · 1 line
2.19.2
maintainer Applied
#1 lore raw
Quoted 3 lines · Christoph Hellwig

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.

Applied, thanks.

Signature · 1 line
Jens Axboe