On 09/30/2014 05:21 PM, Christoph Hellwig wrote:
On Tue, Sep 30, 2014 at 01:50:52PM +0200, Hannes Reinecke wrote:
A tracepoint should be inserted upon completion to make tracing
equivalent to logging.
Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
drivers/scsi/scsi_lib.c | 1 +
drivers/scsi/scsi_trace.c | 16 ++++++++++++++++
include/trace/events/scsi.h | 31 +++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 2df485f..5c67e4e 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1626,6 +1626,7 @@ static void scsi_softirq_done(struct request *rq)
}
scsi_log_completion(cmd, disposition);
+ trace_scsi_cmd_completion(cmd, disposition);
switch (disposition) {
case SUCCESS:
diff --git a/drivers/scsi/scsi_trace.c b/drivers/scsi/scsi_trace.c
index 503594e..51a7737 100644
--- a/drivers/scsi/scsi_trace.c
+++ b/drivers/scsi/scsi_trace.c
@@ -286,3 +286,19 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len)
return scsi_trace_misc(p, cdb, len);
}
}
+
+const char *
+scsi_trace_mlreturn_name(struct trace_seq *p, int rtn)
+{
+ const char *ret = trace_seq_buffer_ptr(p);
+ const char *mlstr = scsi_mlreturn_string(rtn);
+
+ if (mlstr)
+ trace_seq_printf(p, "%s", mlstr);
+ else
+ trace_seq_printf(p, "UNKNOWN (0x%x)", rtn);
+
+ trace_seq_putc(p, 0);
+
+ return ret;
+}
Nak, again this doesn't do the right thing for binary tracing. Please
use __print_symbolic instead.
Okay, will be dropping it. It's of no consequence for the patchset.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@xxxxxxx +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html