From patchwork Tue Jun 13 21:34:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9784807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D8DB0602C9 for ; Tue, 13 Jun 2017 21:35:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC4351FFAE for ; Tue, 13 Jun 2017 21:35:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C12581FFC9; Tue, 13 Jun 2017 21:35:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85A3D1FFAE for ; Tue, 13 Jun 2017 21:35:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753858AbdFMVfI (ORCPT ); Tue, 13 Jun 2017 17:35:08 -0400 Received: from a2nlsmtp01-04.prod.iad2.secureserver.net ([198.71.225.38]:58754 "EHLO a2nlsmtp01-04.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753680AbdFMVfI (ORCPT ); Tue, 13 Jun 2017 17:35:08 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id KtRtdLZI5j2qzKtRtdUdt6; Tue, 13 Jun 2017 14:34:06 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dKtRt-0002KC-PG; Tue, 13 Jun 2017 14:34:05 -0700 From: Long Li To: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, KY Srinivasan , Bart Van Assche , Christoph Hellwig , Stephen Hemminger Cc: Long Li Subject: [PATCH v2] storvsc: use default I/O timeout handler for FC devices Date: Tue, 13 Jun 2017 14:34:05 -0700 Message-Id: <1497389645-8912-1-git-send-email-longli@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 X-CMAE-Envelope: MS4wfLTgldLVLIlHL5djiIHWdbPnnwFxr7N0b3MxPSfq4ynlFJQUuLtlWMOz9tztZblYmzAoRX4EfOSDn2Zx8+sRfM6bdMjnpWPRzu3asTXyWrZYR+gbKgan rotRfk40ZDEjtq7VO4LtUfMXDArlszXYtZrXLhHCc0PdqylQsxgepz+wAifaXHpai8oYI3BlGZ8jYPNymF33IwD8I6n7wvu7mL2Yhjs4mbfbUEIX2HGPR6RQ VMepON36gAbLipZpJdgWDu2vXpPh1VDtl7myuw4g09vmjkabRTww2Pl6WMq/gcOVN5z6TFktlcZ2fYvY7FHCP8QiSY7fk4b2RRa5pYBnrYi9syBYS1BbiClJ jo97Gs6gzEsdYKDz8nQiSe6W6UmBYLHxyZoXUhfb3fX60LwwBJPi/zbENsLV3a6hOyWZEnlgvA2/fnAH7BA3ojWisqDYr4EUXxhm/7s2sNqavI/baFfQ7vh1 GMfOLPPbR+KWKt0I Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Long Li FC disks issue I/O directly to the host storage port driver, this is diffirent to VHD disks where I/O is virtualized and timeout is handled by the host VSP (Virtualization Service Provider). FC disks are usually setup in a multipath system, and they don't want to reset timer on I/O timeout. Timeout is detected by multipath as a good time to failover and recover. Patch v2 includes suggestions from Bart Van Assche Signed-off-by: Long Li --- drivers/scsi/storvsc_drv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 8d955db..3cc8d67 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1495,6 +1495,10 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) */ static enum blk_eh_timer_return storvsc_eh_timed_out(struct scsi_cmnd *scmnd) { +#if IS_ENABLED(CONFIG_SCSI_FC_ATTRS) + if (scmnd->device->host->transportt == fc_transport_template) + return fc_eh_timed_out(scmnd); +#endif return BLK_EH_RESET_TIMER; }