diff options
author | Keith Busch <kbusch@kernel.org> | 2020-10-15 11:36:29 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-10-22 15:27:14 +0200 |
commit | 643c476d6f78cf0349fb8e07334962dd056a3c90 (patch) | |
tree | fed02a84851d4e2ae6c790586f816ddd1b0c24a1 /drivers/nvme | |
parent | a87da50f39d467f2ea4c1f98decb72ef6d87a31e (diff) | |
download | linux-643c476d6f78cf0349fb8e07334962dd056a3c90.tar.bz2 |
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: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/nvme.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index e7c88b40f5bb..cc111136a981 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -176,7 +176,7 @@ static inline struct nvme_request *nvme_req(struct request *req) static inline u16 nvme_req_qid(struct request *req) { - if (!req->rq_disk) + if (!req->q->queuedata) return 0; return blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(req)) + 1; } |