forked from Minki/linux
nvme: add tracing of zns commands
When support for the NVMe ZNS commands was merged, tracing of these has been omitted. Add nvme_cmd_zone_mgmt_send, nvme_cmd_zone_mgmt_recv as well as nvme_cmd_zone_append to the nvme driver's tracing facility. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
3a98c51a24
commit
4a407d5ebc
@ -148,6 +148,35 @@ static const char *nvme_trace_dsm(struct trace_seq *p, u8 *cdw10)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const char *nvme_trace_zone_mgmt_send(struct trace_seq *p, u8 *cdw10)
|
||||
{
|
||||
const char *ret = trace_seq_buffer_ptr(p);
|
||||
u64 slba = get_unaligned_le64(cdw10);
|
||||
u8 zsa = cdw10[12];
|
||||
u8 all = cdw10[13];
|
||||
|
||||
trace_seq_printf(p, "slba=%llu, zsa=%u, all=%u", slba, zsa, all);
|
||||
trace_seq_putc(p, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const char *nvme_trace_zone_mgmt_recv(struct trace_seq *p, u8 *cdw10)
|
||||
{
|
||||
const char *ret = trace_seq_buffer_ptr(p);
|
||||
u64 slba = get_unaligned_le64(cdw10);
|
||||
u32 numd = get_unaligned_le32(cdw10 + 8);
|
||||
u8 zra = cdw10[12];
|
||||
u8 zrasf = cdw10[13];
|
||||
u8 pr = cdw10[14];
|
||||
|
||||
trace_seq_printf(p, "slba=%llu, numd=%u, zra=%u, zrasf=%u, pr=%u",
|
||||
slba, numd, zra, zrasf, pr);
|
||||
trace_seq_putc(p, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const char *nvme_trace_common(struct trace_seq *p, u8 *cdw10)
|
||||
{
|
||||
const char *ret = trace_seq_buffer_ptr(p);
|
||||
@ -190,9 +219,14 @@ const char *nvme_trace_parse_nvm_cmd(struct trace_seq *p,
|
||||
case nvme_cmd_read:
|
||||
case nvme_cmd_write:
|
||||
case nvme_cmd_write_zeroes:
|
||||
case nvme_cmd_zone_append:
|
||||
return nvme_trace_read_write(p, cdw10);
|
||||
case nvme_cmd_dsm:
|
||||
return nvme_trace_dsm(p, cdw10);
|
||||
case nvme_cmd_zone_mgmt_send:
|
||||
return nvme_trace_zone_mgmt_send(p, cdw10);
|
||||
case nvme_cmd_zone_mgmt_recv:
|
||||
return nvme_trace_zone_mgmt_recv(p, cdw10);
|
||||
default:
|
||||
return nvme_trace_common(p, cdw10);
|
||||
}
|
||||
|
@ -697,7 +697,11 @@ enum nvme_opcode {
|
||||
nvme_opcode_name(nvme_cmd_resv_register), \
|
||||
nvme_opcode_name(nvme_cmd_resv_report), \
|
||||
nvme_opcode_name(nvme_cmd_resv_acquire), \
|
||||
nvme_opcode_name(nvme_cmd_resv_release))
|
||||
nvme_opcode_name(nvme_cmd_resv_release), \
|
||||
nvme_opcode_name(nvme_cmd_zone_mgmt_send), \
|
||||
nvme_opcode_name(nvme_cmd_zone_mgmt_recv), \
|
||||
nvme_opcode_name(nvme_cmd_zone_append))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user