• R
    target: Add tracepoints for SCSI commands being processed · e5c0d6ad
    Roland Dreier 提交于
    This patch adds tracepoints to the target code for commands being
    received and being completed, which is quite useful for debugging
    interactions with initiators. For example, one can do something like the
    following to watch commands that are completing unsuccessfully:
    
        # echo 'scsi_status!=0' > /sys/kernel/debug/tracing/events/target/target_cmd_complete/filter
        # echo 1 > /sys/kernel/debug/tracing/events/target/target_cmd_complete/enable
    
            <run command that fails>
    
        # cat /sys/kernel/debug/tracing/trace
             iscsi_trx-0-1902  [003] ...1 990185.810385: target_cmd_complete: iqn.1993-08.org.debian:01:e51ede6aacfd <- LUN 001 status CHECK CONDITION (sense len 18 / 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00)  0x95 data_length    512  CDB 95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  (TA:SIMPLE C:00)
    
    (v2: Drop undefined COMPARE_AND_WRITE)
    Signed-off-by: NRoland Dreier <roland@purestorage.com>
    Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
    e5c0d6ad
target.h 7.5 KB