Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753421AbdFMPiM (ORCPT ); Tue, 13 Jun 2017 11:38:12 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:57452 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751768AbdFMPiK (ORCPT ); Tue, 13 Jun 2017 11:38:10 -0400 X-IronPort-AV: E=Sophos;i="5.39,338,1493654400"; d="scan'208";a="122266146" From: Bart Van Assche To: "linux-kernel@vger.kernel.org" , "kys@microsoft.com" , "martin.petersen@oracle.com" , "linux-scsi@vger.kernel.org" , "sthemmin@microsoft.com" , "longli@exchange.microsoft.com" , "jejb@linux.vnet.ibm.com" , "haiyangz@microsoft.com" CC: "jthumshirn@suse.de" , "longli@microsoft.com" Subject: Re: [Possible Phish Fraud][PATCH] storvsc: use default I/O timeout handler for FC devices Thread-Topic: [Possible Phish Fraud][PATCH] storvsc: use default I/O timeout handler for FC devices Thread-Index: AQHS4+LURlY8XkNqGkmxVZKj+nmEFaIi7lIA Date: Tue, 13 Jun 2017 15:38:06 +0000 Message-ID: <1497368284.2804.5.camel@wdc.com> References: <1497313417-14815-1-git-send-email-longli@exchange.microsoft.com> In-Reply-To: <1497313417-14815-1-git-send-email-longli@exchange.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@sandisk.com; x-originating-ip: [63.163.107.100] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1536;7:OetoDfOPcKgKc/VdE2zFimKFeCgibLdC9V+SaaqEy+STftSZCs229kzvxQ2fWE7Fi7ZvYFzKCFiIMicxhBq/+TtNfBOjanEz16X7DkVgdRPVkst5ULOgaZMllaoOvThS5wnzepPwVSiDqUHmZrFH/oGA2bS01IAFg7hIOQRdib0Fwpv9qfH2bh6RgBZqK1U4JkjO4VgguJbUWCvbo/Dyz6UIpN3oXJyeqmzqOhzlWHovBKeA3BG0xA71Gt7z+J0hHSHPkgsXBvqnfIsScU71pv/lCxCAfNxff/jof1QTQUMYh/sH/HyooJh+iwJG/5LDwfchjSq49DD90CWSiOJrxg==;20:8A8+Yu71oZsc81nBR13M42tZy3QbDKeuW2MwGS0yEmIJ3Z1c+jw+uJrn/9UFchhKwgQKYbw+NdCrTKp6T0MDz/Bj8mPN0QVHlSLG/4wnGkUQXk3txbPwF1yrQCjPkqR0CppoXu1Sy/flwIxprteiJ+CJXZ5pDyEtDFbkWJDJM3s= x-ms-traffictypediagnostic: CY1PR0401MB1536: x-ms-office365-filtering-correlation-id: 010ec232-6872-4c08-4a7f-08d4b2722faa x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:CY1PR0401MB1536; wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0401MB1536;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0401MB1536; x-forefront-prvs: 0337AFFE9A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39840400002)(39450400003)(39410400002)(39860400002)(39850400002)(39400400002)(24454002)(189002)(377424004)(199003)(2201001)(81166006)(8936002)(33646002)(105586002)(101416001)(81156014)(478600001)(189998001)(2900100001)(25786009)(2906002)(14454004)(8676002)(106356001)(72206003)(50986999)(54356999)(76176999)(97736004)(86362001)(3660700001)(103116003)(4326008)(2501003)(5660300001)(2421001)(54906002)(38730400002)(66066001)(3280700002)(6436002)(99286003)(305945005)(1511001)(6506006)(8666007)(36756003)(3846002)(15650500001)(6116002)(102836003)(229853002)(6246003)(68736007)(7736002)(2950100002)(53936002)(7416002)(2561002)(9686003)(122556002)(6486002)(6512007)(77096006);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1536;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: <9BBCA72B0E716848B9E338A33774AAB2@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jun 2017 15:38:06.0850 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1536 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 quoted-printable to 8bit by mail.home.local id v5DFcML5026843 Content-Length: 1868 Lines: 59 On Mon, 2017-06-12 at 17:23 -0700, Long Li wrote: > From: Long Li > > FC disks are usually setup in a multipath system, and they don't want to > unconditionaly reset I/O on timeout. I/O timeout is detected by multipath > as a good time to failover and recover. > > Signed-off-by: Long Li > --- > drivers/scsi/storvsc_drv.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c > index 8d955db..d60b5ea 100644 > --- a/drivers/scsi/storvsc_drv.c > +++ b/drivers/scsi/storvsc_drv.c > @@ -486,6 +486,7 @@ struct hv_host_device { > unsigned int port; > unsigned char path; > unsigned char target; > + bool is_fc; > }; > > struct storvsc_scan_work { > @@ -1495,6 +1496,11 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) > */ > static enum blk_eh_timer_return storvsc_eh_timed_out(struct scsi_cmnd *scmnd) > { > + struct hv_host_device *host_dev = shost_priv(scmnd->device->host); > + > + if (host_dev->is_fc) > + return BLK_EH_NOT_HANDLED; > + > return BLK_EH_RESET_TIMER; > } > > @@ -1738,6 +1744,7 @@ static int storvsc_probe(struct hv_device *device, > > host_dev->port = host->host_no; > host_dev->dev = device; > + host_dev->is_fc = is_fc; > > > stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL); Hello Long, As far as I know there is no other SCSI driver nor block driver in the Linux kernel tree that returns BLK_EH_RESET_TIMER unconditionally. Would a valid alternative fix be to remove storvsc_eh_timed_out() entirely? If not, what would break if that function would be removed entirely? Additionally, for FC, shouldn't that timeout handler handle the "port blocked" state? Shouldn't fc_eh_timed_out() be used for FC instead of just returning BLK_EH_NOT_HANDLED? Thanks, Bart.