path: root/block/blk-mq-tag.h
diff options
authorMing Lei <>2020-06-30 22:03:57 +0800
committerJens Axboe <>2020-06-30 12:57:59 -0600
commit37f4a24c2469a10a4c16c641671bd766e276cf9f (patch)
treedfc8b59c211c73499b74e0c176fba2ae157042cf /block/blk-mq-tag.h
parent723bf178f158abd1ce6069cb049581b3cb003aab (diff)
blk-mq: centralise related handling into blk_mq_get_driver_tag
Move .nr_active update and request assignment into blk_mq_get_driver_tag(), all are good to do during getting driver tag. Meantime blk-flush related code is simplified and flush request needn't to update the request table manually any more. Signed-off-by: Ming Lei <> Cc: Christoph Hellwig <> Signed-off-by: Jens Axboe <>
Diffstat (limited to 'block/blk-mq-tag.h')
1 files changed, 0 insertions, 12 deletions
diff --git a/block/blk-mq-tag.h b/block/blk-mq-tag.h
index 3945c7f5b944..b1acac518c4e 100644
--- a/block/blk-mq-tag.h
+++ b/block/blk-mq-tag.h
@@ -101,18 +101,6 @@ static inline bool hctx_may_queue(struct blk_mq_hw_ctx *hctx,
return atomic_read(&hctx->nr_active) < depth;
- * This helper should only be used for flush request to share tag
- * with the request cloned from, and both the two requests can't be
- * in flight at the same time. The caller has to make sure the tag
- * can't be freed.
- */
-static inline void blk_mq_tag_set_rq(struct blk_mq_hw_ctx *hctx,
- unsigned int tag, struct request *rq)
- hctx->tags->rqs[tag] = rq;
static inline bool blk_mq_tag_is_reserved(struct blk_mq_tags *tags,
unsigned int tag)