Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752051AbdFNTUW (ORCPT ); Wed, 14 Jun 2017 15:20:22 -0400 Received: from mail-sn1nam01on0129.outbound.protection.outlook.com ([104.47.32.129]:54368 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751628AbdFNTUU (ORCPT ); Wed, 14 Jun 2017 15:20:20 -0400 From: Long Li To: Johannes Thumshirn , "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 Subject: RE: [PATCH v2] storvsc: use default I/O timeout handler for FC devices Thread-Topic: [PATCH v2] storvsc: use default I/O timeout handler for FC devices Thread-Index: AQHS5Izwa2SLdqTFKUKeLFOzvvB7n6IkBjkAgAC1TFA= Date: Wed, 14 Jun 2017 19:19:58 +0000 Message-ID: References: <1497389645-8912-1-git-send-email-longli@exchange.microsoft.com> <5d983dac-69b6-ff89-d1ef-e0ea9b8136b1@suse.de> In-Reply-To: <5d983dac-69b6-ff89-d1ef-e0ea9b8136b1@suse.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetBy=longli@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-06-14T12:19:57.2179554-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General authentication-results: suse.de; dkim=none (message not signed) header.d=none;suse.de; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [67.183.216.93] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR03MB3134;7:KvWauS0pxj4Jk72oQsWDddu2+iOzumTWldHVi6SJhQjtP2NK8vD54TOa6T46bN9GSTQ14yc5OnzmtBWcTPSsov+cUoQEYKN7VqtHiOq94CoZEGjVtrhwq9cKxCVw9flu8rFOXERRVYjsduJrX5o+Y8w7nU48ickpM5aniJ1xxMP/3WM2djV5KpUWbTsgJ3Kf93t53YnGbbyFH5bFJOJPcwcM6ikYJuAJDyQLYJHAIEEq0QRe9/ENJ3zPTVODBm3dCsEHhf8BSfXou+Nz74uljCs9jnW3mN3LvBklsw4JqB2wP4lpgyWjyVMrOjefj93sZZcpZ3MhOv2VRwqrxL0QxkXruYq16+2VpPhW6bYlxTkJthN/pTo7ivy/zosQv5i4LC5mGmnugml+Ajdvt0PpT5OOM08EUTOemUMu+PdNYzq8+RUmw2HL9ChPEXYu7HAoYJ8MtW1YkzAKTPpzMmZ1eG462y873Zo2Bd5igoEFX2uBKZgd7epBb4DdonIf65454/NfqJMYk+XNm0KOufXMElVY4LuZhWifmvcqNyi9Pj1DfMP8jzRuV09seYtelC9B7fl8Xx8tTJYZesNwfDRSGBjXydepoXK3orCZpCB7TMnujczjazbC8gQAFGFzMJ+5MGCtHoiwpADyi3gW/m8DdARP+NFU8+POsAdt29E9geIQmFSSbuKzfJbnP4iN/RhgYRyqn/3rJ/0kjW89H3LQBtfYJrme+g4Sxw8svOhz1Xc62zgekRF56YcgcTyWnI5l0GVaUuILMuIE9LHn2/BypVypkU1jYry4nHsezGndeOfARV2R9SGpZMUtTk/a9TH7 x-ms-traffictypediagnostic: MWHPR03MB3134: x-ms-office365-filtering-correlation-id: 76ab6758-aa45-43e2-5c0f-08d4b35a58f3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:MWHPR03MB3134; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(104084551191319)(146099531331640)(42932892334569); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR03MB3134;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR03MB3134; x-forefront-prvs: 033857D0BD x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39840400002)(39850400002)(39410400002)(39400400002)(39860400002)(39450400003)(377454003)(24454002)(13464003)(53936002)(81166006)(33656002)(8676002)(8936002)(14454004)(99286003)(77096006)(55016002)(6436002)(8656002)(229853002)(189998001)(3660700001)(478600001)(8990500004)(2906002)(66066001)(2900100001)(5005710100001)(345774005)(10090500001)(3280700002)(1511001)(2950100002)(74316002)(122556002)(86612001)(2501003)(86362001)(575784001)(6636002)(305945005)(76176999)(50986999)(54356999)(6246003)(2421001)(2201001)(25786009)(9686003)(7736002)(2561002)(3846002)(38730400002)(102836003)(6116002)(10290500003)(6506006)(5660300001)(7696004)(53546009);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR03MB3134;H:MWHPR03MB3136.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jun 2017 19:19:58.4433 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB3134 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v5EJP5eb030722 Content-Length: 2848 Lines: 75 > -----Original Message----- > From: Johannes Thumshirn [mailto:jthumshirn@suse.de] > Sent: Wednesday, June 14, 2017 1:25 AM > To: Long Li ; 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: Re: [PATCH v2] storvsc: use default I/O timeout handler for FC devices > > On 06/13/2017 11:34 PM, Long Li wrote: > > 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 > > Can you please change the #if IS_ENABLED() to > if(IS_ENABLED(CONFIG_SCSI_FC_ATTRS) > && scmnd->device->host->transportt == fc_transport_template) > > That way we have better compiler coverage. Thank you for pointing this out. The coding style is kept consistent with the rest of the FC related code in storvsc. E.g. the definition of fc_transport_template (and many other places): #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS) static struct scsi_transport_template *fc_transport_template; #endif I suggest we make another patch to fix this in all the places. This patch is mainly for fixing FC timeout. Long > > Thanks, > Johannes > > -- > Johannes Thumshirn Storage > jthumshirn@suse.de +49 911 74053 689 > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg > GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) > Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850