Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3058541imm; Sun, 1 Jul 2018 11:16:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf8nYyxzYtc2qTCGXZqbxtfaQ7h/+3aEQ5y58WUrO3AcfNRO+yzbklMB2EJF4TS2icAHGr8 X-Received: by 2002:a62:c8c2:: with SMTP id i63-v6mr6625089pfk.73.1530468960958; Sun, 01 Jul 2018 11:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530468960; cv=none; d=google.com; s=arc-20160816; b=MPjLszmd+MmxxS0wRZ2/v2xRCOm+1qmAHhQkc/g/DwLkO+YdHqf/FRIjGuTOlnxbAD qiTmIFY7k5EjJ4DSSOgTt0IuvKIkwlLnrFO3I0d5WM3IBzfRANvbwldEeQOchvX7Hxp6 7TQoPYlibdKRZ0XsgmHTdgIs2D/IHxTHom9Kc3g5qFjnIU2IJWDSQaBQ3GXip0vMl+6U zQvYvU9FSCaTUx5DWOApHz/TkGTTit7VxBVonmXBOXI5gzTcPDo7HOruyWksPJ66dUm7 Djx4GPvWRd4fmk4vhtBwtq0iDlh39+wi/oS0ca7axQLQFb0hp/vhhIePabyxVRZLzCfu 8ZPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=j0Ofs8C4vuhaoVJH+E5BYvKsUv50vL5aIyjvhNEUpeA=; b=mlR4iEefYA/7EdaRRcgmV6TVAZeozf2BwT1cRDXW7g77xxs+j9/nS7o+uQwsIyvGbM cxG0fADzb7IEWpUCpSkMxm448KKXXaHCUdFBUQwQFXXv33IQvbx53IojrV4a8GO1VbEq UPVP4FSrqHG0BMHbNN+Id5+sY69eeTNgmwTu3cmw7PQZzo4wei4TbsGjxpJlc9wCduhY wuODxEHdE+Ij8mHKZ1inWl5B+H7zPRoIrMmB1Oo0/Ho6xlzzqTq2bR0vl5Ij49srjwkY oRhiM2T+E8gVurK1hcTr+bThgofrOaTMYKYcoms7e238wIN+uzUT8oRZzffuJ1rTLRJP rMjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18-v6si11661047pfl.209.2018.07.01.11.15.46; Sun, 01 Jul 2018 11:16:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965510AbeGASOY (ORCPT + 99 others); Sun, 1 Jul 2018 14:14:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33982 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965388AbeGAQ0u (ORCPT ); Sun, 1 Jul 2018 12:26:50 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BC22692B; Sun, 1 Jul 2018 16:26:49 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steffen Maier , Benjamin Block , "Martin K. Petersen" Subject: [PATCH 4.9 058/101] scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF Date: Sun, 1 Jul 2018 18:21:44 +0200 Message-Id: <20180701160759.468941234@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160757.138608453@linuxfoundation.org> References: <20180701160757.138608453@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Steffen Maier commit 81979ae63e872ef650a7197f6ce6590059d37172 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 LUN : 0x SCSI LUN high : 0x SCSI result : 0x SCSI retries : 0x SCSI allowed : 0x SCSI scribble : 0x SCSI opcode : 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 LUN : 0x SCSI LUN high : 0x 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: Steffen Maier Fixes: 63caf367e1c9 ("[SCSI] zfcp: Improve reliability of SCSI eh handlers in zfcp") Fixes: af4de36d911a ("[SCSI] zfcp: Block scsi_eh thread for rport state BLOCKED") Cc: #2.6.38+ Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/s390/scsi/zfcp_scsi.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -180,6 +180,7 @@ static int zfcp_scsi_eh_abort_handler(st if (abrt_req) break; + zfcp_dbf_scsi_abort("abrt_wt", scpnt, NULL); zfcp_erp_wait(adapter); ret = fc_block_scsi_eh(scpnt); if (ret) { @@ -276,6 +277,7 @@ static int zfcp_task_mgmt_function(struc if (fsf_req) break; + zfcp_dbf_scsi_devreset("wait", scpnt, tm_flags, NULL); zfcp_erp_wait(adapter); ret = fc_block_scsi_eh(scpnt); if (ret) {