Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nvme: use command_id instead of req->tag in trace_nvme_complete_rq()

Use command_id instead of req->tag in trace_nvme_complete_rq(),
because of commit e7006de6c238 ("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: e7006de6c238 ("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>

authored by

Bean Huo and committed by
Jens Axboe
679c54f2 d17f744e

+1 -1
+1 -1
drivers/nvme/host/trace.h
··· 98 98 TP_fast_assign( 99 99 __entry->ctrl_id = nvme_req(req)->ctrl->instance; 100 100 __entry->qid = nvme_req_qid(req); 101 - __entry->cid = req->tag; 101 + __entry->cid = nvme_req(req)->cmd->common.command_id; 102 102 __entry->result = le64_to_cpu(nvme_req(req)->result.u64); 103 103 __entry->retries = nvme_req(req)->retries; 104 104 __entry->flags = nvme_req(req)->flags;