Re: Re: [PATCH 1/3] scsi/trace: Use macros for getting driver byte, host byte, msg byte, and status byte

2014-09-02 Thread Yoshihiro YUNOMAE

(2014/09/02 0:15), Christoph Hellwig wrote:

On Mon, Sep 01, 2014 at 12:33:28PM +, Yoshihiro YUNOMAE wrote:

For getting driver byte, host byte, msg byte, and status byte, macros are
implemented in scsi/scsi.h, so we use it.


As mentioned about three times in various previous scsi logging discussions
this is entirely wrong and breaks decoding binary trace buffers.


No, this patch uses just macros, so this does not change decoders.
However, other patches change decoders in format files, so we need to
consider about these decoders more, as you say.
We'll discuss on https://lkml.org/lkml/2014/8/28/657.

Thanks,
Yoshihiro YUNOMAE

--
Yoshihiro YUNOMAE
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: yoshihiro.yunomae...@hitachi.com


--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] scsi/trace: Use macros for getting driver byte, host byte, msg byte, and status byte

2014-09-01 Thread Yoshihiro YUNOMAE
For getting driver byte, host byte, msg byte, and status byte, macros are
implemented in scsi/scsi.h, so we use it.

Signed-off-by: Yoshihiro YUNOMAE yoshihiro.yunomae...@hitachi.com
Reviewed-by: Ewan D. Milne emi...@redhat.com
Reviewed-by: Hannes Reinecke h...@suse.de
Cc: Hannes Reinecke h...@suse.de
Cc: Doug Gilbert dgilb...@interlog.com
Cc: Martin K. Petersen martin.peter...@oracle.com
Cc: Christoph Hellwig h...@lst.de
Cc: James E.J. Bottomley jbottom...@parallels.com
Cc: Robert Elliott elli...@hp.com
Cc: Ewan D. Milne emi...@redhat.com
Cc: Hidehiro Kawai hidehiro.kawai...@hitachi.com
Cc: Masami Hiramatsu masami.hiramatsu...@hitachi.com
---
 include/trace/events/scsi.h |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/scsi.h b/include/trace/events/scsi.h
index db6c935..8aecdc2 100644
--- a/include/trace/events/scsi.h
+++ b/include/trace/events/scsi.h
@@ -328,10 +328,10 @@ DECLARE_EVENT_CLASS(scsi_cmd_done_timeout_template,
  show_opcode_name(__entry-opcode),
  __parse_cdb(__get_dynamic_array(cmnd), __entry-cmd_len),
  __print_hex(__get_dynamic_array(cmnd), __entry-cmd_len),
- show_driverbyte_name(((__entry-result)  24)  0xff),
- show_hostbyte_name(((__entry-result)  16)  0xff),
- show_msgbyte_name(((__entry-result)  8)  0xff),
- show_statusbyte_name(__entry-result  0xff))
+ show_driverbyte_name(driver_byte(__entry-result)),
+ show_hostbyte_name(host_byte(__entry-result)),
+ show_msgbyte_name(msg_byte(__entry-result)),
+ show_statusbyte_name(status_byte(__entry-result)))
 );
 
 DEFINE_EVENT(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_done,

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] scsi/trace: Use macros for getting driver byte, host byte, msg byte, and status byte

2014-09-01 Thread Christoph Hellwig
On Mon, Sep 01, 2014 at 12:33:28PM +, Yoshihiro YUNOMAE wrote:
 For getting driver byte, host byte, msg byte, and status byte, macros are
 implemented in scsi/scsi.h, so we use it.

As mentioned about three times in various previous scsi logging discussions
this is entirely wrong and breaks decoding binary trace buffers.

NAK.

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html