From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Cc: linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@suse.de>,
Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
lkml <linux-kernel@vger.kernel.org>,
Li Zefan <lizf@cn.fujitsu.com>,
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
Subject: Re: [PATCH 2/2] scsi: add scsi trace core function and put trace points
Date: Wed, 20 Jan 2010 02:58:34 -0500 [thread overview]
Message-ID: <yq1ockpky1h.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <4B56A621.2070301@jp.fujitsu.com> (Kei Tokunaga's message of "Wed, 20 Jan 2010 15:43:45 +0900")
>>>>> "Kei" == Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com> writes:
+ TP_printk("host_no=%u channel=%u id=%u lun=%u cmnd=(%s %s raw=%s) "
^^^^^^^^^^
I'm not sure anybody cares about channels in this millennium so that may
be a waste of space.
+scsi_trace_rw10(struct trace_seq *p, unsigned char *cdb, int len)
+scsi_trace_rw12(struct trace_seq *p, unsigned char *cdb, int len)
+scsi_trace_rw16(struct trace_seq *p, unsigned char *cdb, int len)
+scsi_trace_rw32(struct trace_seq *p, unsigned char *cdb, int len)
Would be handy to get FUA and {RD,WR}PROTECT decoded in these commands.
And prot_op would be nice too.
Other decode-worthy commands might be WRITE SAME(16) and UNMAP.
+scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len)
+{
[...]
+ case READ_32:
+ case WRITE_32:
+ return scsi_trace_rw32(p, cdb, len);
This won't work. READ/WRITE(32) are variable length commands. They
share the same operation code and are distinguished by the service
action field. Several of the most recent additions to the SCSI
protocols are implemented like this.
Other commands requiring two-level parsing are READ CAPACITY(16) and GET
LBA STATUS.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2010-01-20 7:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 6:43 Kei Tokunaga
2010-01-20 7:58 ` Martin K. Petersen [this message]
2010-01-20 8:38 ` Christoph Hellwig
2010-02-01 4:43 ` Kei Tokunaga
2010-01-20 8:37 ` Christoph Hellwig
2010-01-20 17:42 ` Steven Rostedt
2010-02-01 4:45 ` Kei Tokunaga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1ockpky1h.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@suse.de \
--cc=fweisbec@gmail.com \
--cc=kusumi.tomohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tokunaga.keiich@jp.fujitsu.com \
--cc=xiaoguangrong@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome