public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Logging of all scsi commands to a certain target?
@ 2014-08-23 14:54 Hans de Goede
  2014-08-23 15:48 ` Douglas Gilbert
  2014-08-24 21:08 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2014-08-23 14:54 UTC (permalink / raw)
  To: SCSI development list

Hi,

Now that the UAS driver is no longer marked as CONFIG_BROKEN,
I'm getting quite a few bug reports about issues with UAS drives.

Some of these seem to be related to the scsi core and/or the sd
driver sending a command the device does not like.

As such I'm wondering if there us a way to get the kernel
to log each scsi command ? Or at least is there a helper
function to log scsi commands which I can add to the uas driver
(under a verbose option) to allow this ?

Regards,

Hans

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Logging of all scsi commands to a certain target?
  2014-08-23 14:54 Logging of all scsi commands to a certain target? Hans de Goede
@ 2014-08-23 15:48 ` Douglas Gilbert
  2014-08-24 21:08 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Douglas Gilbert @ 2014-08-23 15:48 UTC (permalink / raw)
  To: Hans de Goede, SCSI development list

On 14-08-23 10:54 AM, Hans de Goede wrote:
> Hi,
>
> Now that the UAS driver is no longer marked as CONFIG_BROKEN,
> I'm getting quite a few bug reports about issues with UAS drives.
>
> Some of these seem to be related to the scsi core and/or the sd
> driver sending a command the device does not like.
>
> As such I'm wondering if there us a way to get the kernel
> to log each scsi command ? Or at least is there a helper
> function to log scsi commands which I can add to the uas driver
> (under a verbose option) to allow this ?

Look for uses of this exported function:
     void scsi_print_command(struct scsi_cmnd *cmd)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Logging of all scsi commands to a certain target?
  2014-08-23 14:54 Logging of all scsi commands to a certain target? Hans de Goede
  2014-08-23 15:48 ` Douglas Gilbert
@ 2014-08-24 21:08 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2014-08-24 21:08 UTC (permalink / raw)
  To: Hans de Goede; +Cc: SCSI development list

On Sat, Aug 23, 2014 at 04:54:55PM +0200, Hans de Goede wrote:
> Hi,
> 
> Now that the UAS driver is no longer marked as CONFIG_BROKEN,
> I'm getting quite a few bug reports about issues with UAS drives.
> 
> Some of these seem to be related to the scsi core and/or the sd
> driver sending a command the device does not like.
> 
> As such I'm wondering if there us a way to get the kernel
> to log each scsi command ? Or at least is there a helper
> function to log scsi commands which I can add to the uas driver
> (under a verbose option) to allow this ?

Enable the scsi_dispatch_cmd_start tracepoint using trace-cmd or
debugfs, and filter using host_no/channel/id/lun for your specific
device.  See Documentation/trace/events.txt for details on setting
up filters.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-24 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-23 14:54 Logging of all scsi commands to a certain target? Hans de Goede
2014-08-23 15:48 ` Douglas Gilbert
2014-08-24 21:08 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox