[PATCH] nvme: fix nvme_setup_command metadata trace event
Hou Pu
houpu.main at gmail.com
Mon Jul 19 19:48:47 PDT 2021
On Mon, 19 Jul 2021 09:44:39 -0700, Keith Busch wrote:
> @@ -66,13 +66,13 @@ TRACE_EVENT(nvme_setup_cmd,
> __entry->flags = cmd->common.flags;
> __entry->cid = cmd->common.command_id;
> __entry->nsid = le32_to_cpu(cmd->common.nsid);
> - __entry->metadata = le64_to_cpu(cmd->common.metadata);
> + __entry->metadata = !!blk_integrity_rq(req);
> __entry->fctype = cmd->fabrics.fctype;
> __assign_disk_name(__entry->disk, req->rq_disk);
> memcpy(__entry->cdw10, &cmd->common.cdw10,
> sizeof(__entry->cdw10));
> ),
> - TP_printk("nvme%d: %sqid=%d, cmdid=%u, nsid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)",
> + TP_printk("nvme%d: %sqid=%d, cmdid=%u, nsid=%u, flags=0x%x, meta=0x%x, cmd=(%s %s)",
Can we also change "cmd=(%s %s)" to "cmd(%s, %s)" like the target side.
Current host side trace:
kworker/3:1H-120 [003] .... 115.253610: nvme_setup_cmd: nvme0: qid=0, cmdid=17, nsid=0, flags=0x0, meta=0x0, cmd=(nvme_admin_identify cns=2, ctrlid=0)
kworker/3:1H-120 [003] .... 115.264971: nvme_setup_cmd: nvme0: qid=0, cmdid=18, nsid=1, flags=0x0, meta=0x0, cmd=(nvme_admin_identify cns=3, ctrlid=0)
kworker/3:1H-120 [003] .... 115.279639: nvme_setup_cmd: nvme0: qid=0, cmdid=19, nsid=1, flags=0x0, meta=0x0, cmd=(nvme_admin_identify cns=0, ctrlid=0)
Current target side trace:
kworker/0:1H-56 [000] .... 50793.382363: nvmet_req_init: nvmet1: qid=0, cmdid=17, nsid=0, flags=0x40, meta=0x0, cmd=(nvme_admin_identify, cns=2, ctrlid=0)
kworker/0:1H-56 [000] .... 50793.391998: nvmet_req_init: nvmet1: qid=0, cmdid=18, nsid=1, flags=0x40, meta=0x0, cmd=(nvme_admin_identify, cns=3, ctrlid=0)
kworker/0:1H-56 [000] .... 50793.406733: nvmet_req_init: nvmet1: qid=0, cmdid=19, nsid=1, flags=0x40, meta=0x0, cmd=(nvme_admin_identify, cns=0, ctrlid=0)
Thanks,
Hou
More information about the Linux-nvme
mailing list