提交 bbd033cb 编写于 作者: B Bean Huo 提交者: Zheng Zengkai

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

stable inclusion
from stable-v5.10.137
commit 706960d328f5bdb1a9cde0b17a98ab84a59eed8e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=706960d328f5bdb1a9cde0b17a98ab84a59eed8e

--------------------------------

[ Upstream commit 679c54f2 ]

Use command_id instead of req->tag in trace_nvme_complete_rq(),
because of commit e7006de6 ("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: e7006de6 ("nvme: code command_id with a genctr for use authentication after release")
Signed-off-by: NBean Huo <beanhuo@micron.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 f85cd1a9
...@@ -98,7 +98,7 @@ TRACE_EVENT(nvme_complete_rq, ...@@ -98,7 +98,7 @@ TRACE_EVENT(nvme_complete_rq,
TP_fast_assign( TP_fast_assign(
__entry->ctrl_id = nvme_req(req)->ctrl->instance; __entry->ctrl_id = nvme_req(req)->ctrl->instance;
__entry->qid = nvme_req_qid(req); __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->result = le64_to_cpu(nvme_req(req)->result.u64);
__entry->retries = nvme_req(req)->retries; __entry->retries = nvme_req(req)->retries;
__entry->flags = nvme_req(req)->flags; __entry->flags = nvme_req(req)->flags;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册