From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbdCHKdr (ORCPT ); Wed, 8 Mar 2017 05:33:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:59087 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbdCHKdo (ORCPT ); Wed, 8 Mar 2017 05:33:44 -0500 Subject: Re: [PATCH] storvsc: workaround for virtual DVD SCSI version To: Stephen Hemminger , kys@microsoft.com, haiyangz@microsoft.com, longli@microsoft.com, martin.petersen@oracle.com, hch@lst.de References: <20170307171553.13247-1-sthemmin@microsoft.com> Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, Stephen Hemminger From: Hannes Reinecke Message-ID: <7b3fcc1f-e446-032c-d02b-b9ab1ee6512e@suse.de> Date: Wed, 8 Mar 2017 08:00:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170307171553.13247-1-sthemmin@microsoft.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/2017 06:15 PM, Stephen Hemminger wrote: > Hyper-V host emulation of SCSI for virtual DVD device reports SCSI > version 0 (UNKNOWN) but is still capable of supporting REPORTLUN. > > Without this patch, a GEN2 Linux guest on Hyper-V will not boot 4.11 > successfully with virtual DVD ROM device. What happens is that the > SCSI scan process falls back to doing sequential probing by INQUIRY. > But the storvsc driver has a previous workaround that masks/blocks all > errors reports from INQUIRY (or MODE_SENSE) commands. This workaround > causes the scan to then populate a full set of bogus LUN's on the > target and then sends kernel spinning off into a death spiral doing > block reads on the non-existent LUNs. > > By setting the correct blacklist flags, the target with the > DVD device is scanned with REPORTLUN and that works correctly. > > Patch needs to go in current 4.11, it is safe but not necessary > in older kernels. > > Signed-off-by: Stephen Hemminger > --- > drivers/scsi/storvsc_drv.c | 27 +++++++++++++++++---------- > 1 file changed, 17 insertions(+), 10 deletions(-) > > PS: The error handling does need to be fixed (have patches pending) > but that is interrelated with hotplug and can wait. > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)