[PATCH 1/3] nvmet: parse dsm command's attr deallocate when tracing

Guixin Liu kanie at linux.alibaba.com
Tue Feb 27 00:54:06 PST 2024


Add parse of dsm command's attr deallocate to make the trace log
more consistent and human-readable.

Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
---
 drivers/nvme/target/trace.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/nvme/target/trace.c b/drivers/nvme/target/trace.c
index 6ee1f3db81d0..657bd31841b2 100644
--- a/drivers/nvme/target/trace.c
+++ b/drivers/nvme/target/trace.c
@@ -83,10 +83,10 @@ static const char *nvmet_trace_read_write(struct trace_seq *p, u8 *cdw10)
 static const char *nvmet_trace_dsm(struct trace_seq *p, u8 *cdw10)
 {
 	const char *ret = trace_seq_buffer_ptr(p);
+	u8 nr = cdw10[0];
+	u8 ad = (cdw10[4] >> 2) & 0x1;
 
-	trace_seq_printf(p, "nr=%u, attributes=%u",
-			 get_unaligned_le32(cdw10),
-			 get_unaligned_le32(cdw10 + 4));
+	trace_seq_printf(p, "nr=%u, ad=%u", nr, ad);
 	trace_seq_putc(p, 0);
 
 	return ret;
-- 
2.43.0




More information about the Linux-nvme mailing list