]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nvme: use command_id instead of req->tag in trace_nvme_complete_rq()
authorBean Huo <beanhuo@micron.com>
Fri, 15 Jul 2022 21:27:21 +0000 (23:27 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:46 +0000 (17:22 -0600)
Use command_id instead of req->tag in trace_nvme_complete_rq(),
because of commit e048b22adf66 ("nvme: code command_id with a genctr
for use authentication after release"), cmd->common.command_id is set to
((genctl & 0xf)< 12 | req->tag), no longer req->tag, which makes cid in
trace_nvme_complete_rq and trace_nvme_setup_cmd are not the same.

Fixes: e048b22adf66 ("nvme: code command_id with a genctr for use authentication after release")
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/trace.h

index 37c7f4c89f92e4caf386f422d6bdd0e8c09201d4..6f0eaf6a15282e2f71f7318b82b0b29ff829e178 100644 (file)
@@ -98,7 +98,7 @@ TRACE_EVENT(nvme_complete_rq,
            TP_fast_assign(
                __entry->ctrl_id = nvme_req(req)->ctrl->instance;
                __entry->qid = nvme_req_qid(req);
-               __entry->cid = req->tag;
+               __entry->cid = nvme_req(req)->cmd->common.command_id;
                __entry->result = le64_to_cpu(nvme_req(req)->result.u64);
                __entry->retries = nvme_req(req)->retries;
                __entry->flags = nvme_req(req)->flags;