From: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
To: "Martin K. Petersen" <martin.petersen@oracle.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>,
Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Subject: Re: [PATCH 2/2] scsi: add scsi trace core function and put trace points
Date: Mon, 01 Feb 2010 13:43:19 +0900 [thread overview]
Message-ID: <4B665BE7.8040001@jp.fujitsu.com> (raw)
In-Reply-To: <yq1ockpky1h.fsf@sermon.lab.mkp.net>
Martin K. Petersen wrote:
>>>>>> "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.
Thanks for the suggestions. I'm going to post v2 series of this
patchset soon, and please note, in that version, I didn't add the
decoding on these stuff you mentioned above.
> +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.
This is definitely a valid point. In the v2 patchset, I tried to
fix it. (Only DIF_TYPE2 READ/WRITE(32) are handled in that
version.) It'd be great if you would review it.
I'm sorry that I didn't reply sooner.
Thanks,
Kei
next prev parent reply other threads:[~2010-02-01 4:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 6:43 [PATCH 2/2] scsi: add scsi trace core function and put trace points Kei Tokunaga
2010-01-20 7:58 ` Martin K. Petersen
2010-01-20 8:38 ` Christoph Hellwig
2010-02-01 4:43 ` Kei Tokunaga [this message]
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=4B665BE7.8040001@jp.fujitsu.com \
--to=tokunaga.keiich@jp.fujitsu.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=martin.petersen@oracle.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--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