@@ -865,6 +865,7 @@ bool blk_mq_get_driver_tag(struct request *rq, struct blk_mq_hw_ctx **hctx,
*hctx = data.hctx;
return rq->tag != -1;
}
+EXPORT_SYMBOL(blk_mq_get_driver_tag);
static void __blk_mq_put_driver_tag(struct blk_mq_hw_ctx *hctx,
struct request *rq)
@@ -255,6 +255,9 @@ int blk_mq_reinit_tagset(struct blk_mq_tag_set *set);
int blk_mq_map_queues(struct blk_mq_tag_set *set);
void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues);
+bool blk_mq_get_driver_tag(struct request *rq, struct blk_mq_hw_ctx **hctx,
+ bool wait);
+
/*
* Driver command data is immediately after the request. So subtract request
* size to get back to the original request, add request size to get the PDU.
Before blk-mq iosched is introduced, drivers may suppose the the allocated request includes one valid tag number, but it becomes not true any more after we bring mq iosched in. So introduces this helper to make driver get req's hw tag. Mtip32xx needs this helper for sending internal command via one request. Signed-off-by: Ming Lei <ming.lei@redhat.com> --- block/blk-mq.c | 1 + include/linux/blk-mq.h | 3 +++ 2 files changed, 4 insertions(+)