nvme: use queuedata for nvme_req_qid
Keith Busch
maintainerPATCH v2 1/1 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 <[email protected]>
---v1->v2
Don't bother setting the rq_disk request parameter; use the existing queuedata criteria instead
drivers/nvme/host/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/nvme.h +1 -1
@@ -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 ; }
Signature · 7 lines
2.24.1 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Thanks,
applied to nvme-5.10.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme