Commit 6ce913fe authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: rename REQ_HIPRI to REQ_POLLED



Unlike the RWF_HIPRI userspace ABI which is intentionally kept vague,
the bio flag is specific to the polling implementation, so rename and
document it properly.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Tested-by: default avatarMark Wunderlich <mark.wunderlich@intel.com>
Link: https://lore.kernel.org/r/20211012111226.760968-12-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d729cf9a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -842,7 +842,7 @@ static noinline_for_stack bool submit_bio_checks(struct bio *bio)
	}

	if (!test_bit(QUEUE_FLAG_POLL, &q->queue_flags))
		bio_clear_hipri(bio);
		bio_clear_polled(bio);

	switch (bio_op(bio)) {
	case REQ_OP_DISCARD:
+1 −2
Original line number Diff line number Diff line
@@ -318,8 +318,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
	 * iopoll in direct IO routine. Given performance gain of iopoll for
	 * big IO can be trival, disable iopoll when split needed.
	 */
	bio_clear_hipri(bio);

	bio_clear_polled(bio);
	return bio_split(bio, sectors, GFP_NOIO, bs);
}

+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ static const char *const cmd_flag_name[] = {
	CMD_FLAG_NAME(BACKGROUND),
	CMD_FLAG_NAME(NOWAIT),
	CMD_FLAG_NAME(NOUNMAP),
	CMD_FLAG_NAME(HIPRI),
	CMD_FLAG_NAME(POLLED),
};
#undef CMD_FLAG_NAME

+2 −2
Original line number Diff line number Diff line
@@ -732,7 +732,7 @@ bool blk_mq_complete_request_remote(struct request *rq)
	 * For a polled request, always complete locallly, it's pointless
	 * to redirect the completion.
	 */
	if (rq->cmd_flags & REQ_HIPRI)
	if (rq->cmd_flags & REQ_POLLED)
		return false;

	if (blk_mq_complete_need_ipi(rq)) {
@@ -2278,7 +2278,7 @@ blk_qc_t blk_mq_submit_bio(struct bio *bio)

	rq_qos_throttle(q, bio);

	hipri = bio->bi_opf & REQ_HIPRI;
	hipri = bio->bi_opf & REQ_POLLED;

	plug = blk_mq_plug(q, bio);
	if (plug && plug->cached_rq) {
+2 −2
Original line number Diff line number Diff line
@@ -106,9 +106,9 @@ static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
	enum hctx_type type = HCTX_TYPE_DEFAULT;

	/*
	 * The caller ensure that if REQ_HIPRI, poll must be enabled.
	 * The caller ensure that if REQ_POLLED, poll must be enabled.
	 */
	if (flags & REQ_HIPRI)
	if (flags & REQ_POLLED)
		type = HCTX_TYPE_POLL;
	else if ((flags & REQ_OP_MASK) == REQ_OP_READ)
		type = HCTX_TYPE_READ;
Loading