• Steffen Maier's avatar
    scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF · 941e8bee
    Steffen Maier authored
    commit 81979ae6 upstream.
    
    We already have a SCSI trace for the end of abort and scsi_eh TMF. Due to
    zfcp_erp_wait() and fc_block_scsi_eh() time can pass between the start of
    our eh callback and an actual send/recv of an abort / TMF request.  In order
    to see the temporal sequence including any abort / TMF send retries, add a
    trace before the above two blocking functions.  This supports problem
    determination with scsi_eh and parallel zfcp ERP.
    
    No need to explicitly trace the beginning of our eh callback, since we
    typically can send an abort / TMF and see its HBA response (in the worst
    case, it's a pseudo response on dismiss all of adapter recovery, e.g. due to
    an FSF request timeout [fsrth_1] of the abort / TMF). If we cannot send, we
    now get a trace record for the first "abrt_wt" or "[lt]r_wait" which denotes
    almost the beginning of the callback.
    
    No need to explicitly trace the wakeup after the above two blocking
    functions because the next retry loop causes another trace in any case and
    that is sufficient.
    
    Example trace records formatted with zfcpdbf from s390-tools:
    
    Timestamp      : ...
    Area           : SCSI
    Subarea        : 00
    Level          : 1
    Exception      : -
    CPU ID         : ..
    Caller         : 0x...
    Record ID      : 1
    Tag            : abrt_wt        abort, before zfcp_erp_wait()
    Request ID     : 0x0000000000000000                     none (invalid)
    SCSI ID        : 0x<scsi_id>
    SCSI LUN       : 0x<scsi_lun>
    SCSI LUN high  : 0x<scsi_lun_high>
    SCSI result    : 0x<scsi_result_of_cmd_to_be_aborted>
    SCSI retries   : 0x<retries_of_cmd_to_be_aborted>
    SCSI allowed   : 0x<allowed_retries_of_cmd_to_be_aborted>
    SCSI scribble  : 0x<req_id_of_cmd_to_be_aborted>
    SCSI opcode    : <CDB_of_cmd_to_be_aborted>
    FCP rsp inf cod: 0x..                                   none (invalid)
    FCP rsp IU     : ...                                    none (invalid)
    
    Timestamp      : ...
    Area           : SCSI
    Subarea        : 00
    Level          : 1
    Exception      : -
    CPU ID         : ..
    Caller         : 0x...
    Record ID      : 1
    Tag            : lr_wait        LUN reset, before zfcp_erp_wait()
    Request ID     : 0x0000000000000000                     none (invalid)
    SCSI ID        : 0x<scsi_id>
    SCSI LUN       : 0x<scsi_lun>
    SCSI LUN high  : 0x<scsi_lun_high>
    SCSI result    : 0x...                                  unrelated
    SCSI retries   : 0x..                                   unrelated
    SCSI allowed   : 0x..                                   unrelated
    SCSI scribble  : 0x...                                  unrelated
    SCSI opcode    : ...                                    unrelated
    FCP rsp inf cod: 0x..                                   none (invalid)
    FCP rsp IU     : ...                                    none (invalid)
    Signed-off-by: default avatarSteffen Maier <maier@linux.ibm.com>
    Fixes: 63caf367 ("[SCSI] zfcp: Improve reliability of SCSI eh handlers in zfcp")
    Fixes: af4de36d ("[SCSI] zfcp: Block scsi_eh thread for rport state BLOCKED")
    Cc: <stable@vger.kernel.org> #2.6.38+
    Reviewed-by: default avatarBenjamin Block <bblock@linux.ibm.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    941e8bee
zfcp_scsi.c 22.6 KB