* [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag
@ 2020-08-27 6:34 Xianting Tian
2020-09-01 14:03 ` Tianxianting
2020-09-01 15:00 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Xianting Tian @ 2020-08-27 6:34 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel, Xianting Tian
Replace various magic -1 constants for tags with BLK_MQ_NO_TAG.
Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
---
block/blk-core.c | 4 ++--
block/blk-mq-sched.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index d9d632639..c7eaf7504 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -116,8 +116,8 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
rq->__sector = (sector_t) -1;
INIT_HLIST_NODE(&rq->hash);
RB_CLEAR_NODE(&rq->rb_node);
- rq->tag = -1;
- rq->internal_tag = -1;
+ rq->tag = BLK_MQ_NO_TAG;
+ rq->internal_tag = BLK_MQ_NO_TAG;
rq->start_time_ns = ktime_get_ns();
rq->part = NULL;
refcount_set(&rq->ref, 1);
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index a19cdf159..439481f59 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -522,7 +522,7 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head,
goto run;
}
- WARN_ON(e && (rq->tag != -1));
+ WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG));
if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) {
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag
2020-08-27 6:34 [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag Xianting Tian
@ 2020-09-01 14:03 ` Tianxianting
2020-09-01 15:00 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Tianxianting @ 2020-09-01 14:03 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel
Hi Jens
Could I get the feedback from you whether this patch can be applied?
Thanks a lot.
-----Original Message-----
From: tianxianting (RD)
Sent: Thursday, August 27, 2020 2:34 PM
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org; linux-kernel@vger.kernel.org; tianxianting (RD) <tian.xianting@h3c.com>
Subject: [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag
Replace various magic -1 constants for tags with BLK_MQ_NO_TAG.
Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
---
block/blk-core.c | 4 ++--
block/blk-mq-sched.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c index d9d632639..c7eaf7504 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -116,8 +116,8 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
rq->__sector = (sector_t) -1;
INIT_HLIST_NODE(&rq->hash);
RB_CLEAR_NODE(&rq->rb_node);
- rq->tag = -1;
- rq->internal_tag = -1;
+ rq->tag = BLK_MQ_NO_TAG;
+ rq->internal_tag = BLK_MQ_NO_TAG;
rq->start_time_ns = ktime_get_ns();
rq->part = NULL;
refcount_set(&rq->ref, 1);
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index a19cdf159..439481f59 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -522,7 +522,7 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head,
goto run;
}
- WARN_ON(e && (rq->tag != -1));
+ WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG));
if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) {
/*
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag
2020-08-27 6:34 [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag Xianting Tian
2020-09-01 14:03 ` Tianxianting
@ 2020-09-01 15:00 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2020-09-01 15:00 UTC (permalink / raw)
To: Xianting Tian; +Cc: linux-block, linux-kernel
On 8/27/20 12:34 AM, Xianting Tian wrote:
> Replace various magic -1 constants for tags with BLK_MQ_NO_TAG.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-01 15:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 6:34 [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag Xianting Tian
2020-09-01 14:03 ` Tianxianting
2020-09-01 15:00 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).