Commit 643c476d authored by Keith Busch's avatar Keith Busch Committed by Christoph Hellwig

nvme: use queuedata for nvme_req_qid

The request's rq_disk isn't set for passthrough IO commands, so tracing
uses qid 0 for these which incorrectly decodes as an admin command. Use
the request_queue's queuedata instead since that value is always set for
the IO queues, and never set for the admin queue.
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent a87da50f
...@@ -176,7 +176,7 @@ static inline struct nvme_request *nvme_req(struct request *req) ...@@ -176,7 +176,7 @@ static inline struct nvme_request *nvme_req(struct request *req)
static inline u16 nvme_req_qid(struct request *req) static inline u16 nvme_req_qid(struct request *req)
{ {
if (!req->rq_disk) if (!req->q->queuedata)
return 0; return 0;
return blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(req)) + 1; return blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(req)) + 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment