[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq1ockpky1h.fsf@sermon.lab.mkp.net>
Date: Wed, 20 Jan 2010 02:58:34 -0500
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Kei Tokunaga <tokunaga.keiich@...fujitsu.com>
Cc: linux-scsi@...r.kernel.org,
James Bottomley <James.Bottomley@...e.de>,
Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
lkml <linux-kernel@...r.kernel.org>,
Li Zefan <lizf@...fujitsu.com>,
Xiao Guangrong <xiaoguangrong@...fujitsu.com>,
Tomohiro Kusumi <kusumi.tomohiro@...fujitsu.com>
Subject: Re: [PATCH 2/2] scsi: add scsi trace core function and put trace points
>>>>> "Kei" == Kei Tokunaga <tokunaga.keiich@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists