This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Tue Apr 23 07:29:09 2024 >From spaans Tue Oct 21 06:48:22 2014 Received: from pop.ziggo.nl [212.54.42.19] by squeeze.vs19.net with POP3 (fetchmail-6.3.21) for (single-drop); Tue, 21 Oct 2014 06:48:18 +0200 (CEST) Received: from md1.tb.mail.iss.local ([212.54.42.100]) by mc5.tb.mail.iss.local (Dovecot) with LMTP id XyjtAlXiRVSibgAAh0Kp1A for ; Tue, 21 Oct 2014 06:46:34 +0200 Received: from mx1.tb.mail.iss.as9143.net ([212.54.42.100]) by md1.tb.mail.iss.local (Dovecot) with LMTP id mKkSMhTTF1QrBAAAP8oO3g ; Tue, 21 Oct 2014 06:46:28 +0200 Received: from vger.kernel.org ([209.132.180.67]) by mx1.tb.mail.iss.as9143.net with esmtp (Exim 4.76) (envelope-from ) id 1XgRL7-0003uu-Do for bmw12-lkml@ziggo.nl; Tue, 21 Oct 2014 06:46:34 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752936AbaJUEp4 convert rfc822-to-quoted-printable (ORCPT ); Tue, 21 Oct 2014 00:45:56 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:56739 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730AbaJUEpy convert rfc822-to-8bit (ORCPT ); Tue, 21 Oct 2014 00:45:54 - Received: by mail-wg0-f47.google.com with SMTP id x13so380613wgg.6 for ; Mon, 20 Oct 2014 21:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=NfZbJ X-Received: by 10.180.205.171 with SMTP id lh11mr25566174wic.66.1413866752682; Mon, 20 Oct 2014 21:45:52 -0700 (PDT) Received: from sucs.org (silver.sucs.swan.ac.uk. [137.44.10.1]) by mx.google.com with ESMTPSA id u9sm11743335wiv.8.2014.10.20.21.45.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 20 Oct 2014 21:45:52 -0 Date: Tue, 21 Oct 2014 05:45:50 +0100 From: Sitsofe Wheeler To: KY Srinivasan Cc: Jeff Leung , James Bottomley , Christoph Hellwig , Haiyang Zhang , Christoph Hellwig , Hannes Reinecke , "linux-scsi@vger.k Subject: Re: [PATCH 0/3] scsi: Add Hyper-V logical block provisioning quirks Message-Id: <20141021044550.GC11691@sucs.org> References: <20141010074901.GA32028@sucs.org> <20141011173902.GA1946@infradead.org> <1413049313.2068.48.camel@jarvis.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-Id: X-Mailing-List: linux-kernel@vger.kernel.org X-Ziggo-spamsetting: Instelling=Gemiddeld Scorelimiet=14 X-Ziggo-spambar: +++ X-Ziggo-spamscore: 3.2 X-Ziggo-spamreport: BAYES_00=-1.9,CM_SPACED_DATE=0.5,FREEMAIL_FROM=0.5,KB_DATE_CONTAINS_TAB=2.751,L_TAB_IN_FROM=2,RCVD_IN_JMF_W=-1,TAB_IN_FROM=0.389,T_RP_MATCHES_RCVD=-0.01 X-Ziggo-Spam-Status: No X-Spam-Status: No X-Spam-Flag: No On Sun, Oct 12, 2014 at 01:21:01AM +0000, KY Srinivasan wrote: >=20 > > -----Original Message----- > > From: Jeff Leung [mailto:jleung@v10networks.ca] > > Sent: Saturday, October 11, 2014 1:22 PM > >=20 > > > On the current release of Windows (windows 10), we are advertisin= g > > > SPC3 compliance. > > > We are ok with declaring compliance to SPC3 in our drivers. > > If you are going to declare SPC3 compliance in the drivers, are you= going to > > put in checks to ensure that SPC-3 compliance doesn't get accidenta= lly > > enabled for hypervisors below Win10? > >=20 > > I do know for a fact that Ubuntu's kernels already force SPC3 compl= iance to > > enable specific features such as TRIM on earlier versions of Hyper-= V (Namely > > Hyper-V 2012 and 2012 R2). > You are right; Ubuntu has been carrying a patch that was doing just > this and this has been working without any issues on many earlier > versions of Windows. (2012 and 2012 R2). On windows 10 we don't need > any changes in the Linux driver as the host itself is advertising SPC= 3 > compliance. Based on the testing we have done with Ubuntu, we are > comfortable picking up that patch. OK this seems to be the patch currently carried by Ubuntu: =46rom ff2c5fa3fa9adf0b919b9425e71a8ba044c31a7d Mon Sep 17 00:00:00 200= 1 =46rom: Andy Whitcroft Date: Fri, 13 Sep 2013 17:49:16 +0100 Subject: [PATCH] scsi: hyper-v storsvc switch up to SPC-3 Suggested-By: James Bottomley Signed-off-by: Andy Whitcroft --- drivers/scsi/storvsc_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 9969fa1..3903c8a 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1441,6 +1441,14 @@ static int storvsc_device_configure(struct scsi_= device *sdevice) =20 sdevice->no_write_same =3D 1; =20 + /* + * hyper-v lies about its capabilities indicating it is only SPC-2 + * compliant, but actually implements the core SPC-3 features. + * If we pretend to be SPC-3, we send RC16 which activates trim and + * will query the appropriate VPD pages to enable trim. + */ + sdevice->scsi_level =3D SCSI_SPC_3; + return 0; } =20 --=20 1.7.9.5 (Downloaded from http://kernel.ubuntu.com/git?p=3Djsalisbury/stable/trusty/ubuntu-trusty= =2Egit;a=3Dpatch;h=3Dff2c5fa3fa9adf0b919b9425e71a8ba044c31a7d ). I think it's unwise to override the scsi_level at this particular point because you are going to do it for ALL Hyper-V "disks" (perhaps all Hyper-V SCSI devices?)... Here's the SCSI inquiry information reported by a USB 2 hard disk being passed passed-through by one of my 2012 R2 hosts: # sg_inq /dev/sdc standard INQUIRY: PQual=3D0 Device_type=3D0 RMB=3D0 version=3D0x02 [SCSI-2] [AERC=3D0] [TrmTsk=3D0] NormACA=3D0 HiSUP=3D0 Resp_data_format=3D= 1 SCCS=3D0 ACC=3D0 TPGS=3D0 3PC=3D0 Protect=3D0 [BQue=3D0] EncServ=3D0 MultiP=3D0 [MChngr=3D0] [ACKREQQ=3D0] Addr16=3D0 [RelAdr=3D0] WBus16=3D0 Sync=3D0 Linked=3D0 [TranDis=3D0] CmdQue= =3D0 length=3D36 (0x24) Peripheral device type: disk Vendor identification: MDT MD50 Product identification: 00AAKS-00TMA0 =20 Product revision level:=20 Is it OK to replace a scsi_level of SCSI-2 with SCSI_SPC_3? Additionall= y is it also OK to force SCSI_SPC_3 on Hyper-V 2008? > > > Nry=D8=B2Xv=D8=96){n=C7=89{zX=17}zj:v zZzf~zw=DA=A2)=1BjyA > > > > > > =0Fi > N?????r??y????b?X??=C7=A7v?^?)=DE=BA{.n?+????{????zX??=17??=DC=A8}???= =C6=A0z?&j:+v???=07????zZ+??+zf???h???~????i???z?=1E?w?????????&?)=DF=A2= =1Bf??^j=C7=ABy?m??@A?a??=7F?=0C0??h?=0F??i=7F ^^^ Where do these characters come from? I've occasionally seen them on emails from other Microsoft folks posting to LKML too... --=20 Sitsofe | http://sucs.org/~sits/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/