linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: KY Srinivasan <kys@microsoft.com>
To: James Bottomley <jbottomley@parallels.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hch@infradead.org" <hch@infradead.org>,
	"sitsofe@gmail.com" <sitsofe@gmail.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"apw@canonical.com" <apw@canonical.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"ohering@suse.com" <ohering@suse.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: RE: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests
Date: Sat, 26 Jul 2014 13:42:46 +0000	[thread overview]
Message-ID: <739c32de010444499fea6f5f47ca948d@BY2PR0301MB0711.namprd03.prod.outlook.com> (raw)
In-Reply-To: <1406308203.1789.33.camel@jarvis.lan>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3902 bytes --]



> -----Original Message-----
> From: James Bottomley [mailto:jbottomley@parallels.com]
> Sent: Friday, July 25, 2014 10:10 AM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; hch@infradead.org; sitsofe@gmail.com;
> devel@linuxdriverproject.org; apw@canonical.com;
> martin.petersen@oracle.com; linux-scsi@vger.kernel.org;
> ohering@suse.com; gregkh@linuxfoundation.org; jasowang@redhat.com
> Subject: Re: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks tests
> 
> On Fri, 2014-07-25 at 16:47 +0000, KY Srinivasan wrote:
> >
> > > -----Original Message-----
> > > From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
> > > Sent: Thursday, July 24, 2014 8:54 AM
> > > To: Sitsofe Wheeler
> > > Cc: Martin K. Petersen; Christoph Hellwig; KY Srinivasan;
> > > gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
> > > devel@linuxdriverproject.org; ohering@suse.com; apw@canonical.com;
> > > jasowang@redhat.com; jbottomley@parallels.com; linux-
> > > scsi@vger.kernel.org
> > > Subject: Re: [PATCH v2 3/3] [SCSI] Make LBP quirk skip lbpme checks
> > > tests
> > >
> > > >>>>> "Sitsofe" == Sitsofe Wheeler <sitsofe@gmail.com> writes:
> > >
> > > Sitsofe> So we can see it is really a SATA device that announces
> > > Sitsofe> discard correctly and supports discard through WRITE_SAME(16).
> > >
> > > No, that's the SATA device that announces support for DSM TRIM, and
> > > as a result the Linux SATL reports support for WRITE SAME(16) w. the
> > > UNMAP bit set and LBPME.
> > >
> > > Sitsofe> It is the act of passing it through Hyper-V that turned it
> > > Sitsofe> into a SCSI device that supports UNMAP (but not
> > > Sitsofe> WRITE_SAME(16)), doesn't announce its SCSI conformance
> > > Sitsofe> number and doesn't correctly announce which features it
> > > Sitsofe> supports. Surely in this case it's reasonable to quirk our way
> around the problem?
> > >
> > > No. That's an issue in Hyper-V that'll you'll have to take up with
> > > Microsoft. I don't know what their passthrough limitations are for SCSI-
> ATA translation.
> > > Maybe K. Y. has some insight into this?
> >
> > For the pass through case, the host validates the request and passes
> > the request to the device.
> > However, not all scsi commands are passed through even though the
> > device it is being passed through may support the command. WRITE_SAME
> > is one such command. Consequently, in the EVPD page, we will set state
> > indicating that WRITE_SAME is not supported (even if the device
> > supports it).
> 
> I think you haven't appreciated the problem: He's passing a SATA SSD via the
> SCSI hyper-v interface.  That means that the windows host is doing SCSI<-
> >ATA translation.  The problem is that the Windows translation layer (SATL)
> looks to be incomplete and it's not correctly translating the IDENTIFY bit that
> corresponds to TRIM to the correct VPD pages so consequently, Linux  won't
> send UNMAP commands to the device (to be translated back to TRIM).
> 
> We already know this is a bug in the Windows SATL which needs fixing (if you
> could report it and get a fix, that would be great) and that we're not going to
> be able to work around this automatically in Linux because the proposed
> patch would have us unconditionally try UNMAP for all Hyper-V devices.  The
> current proposed fix is to enable UNMAP manually via sysfs in the guest boot
> scripts, but obviously that means that Hyper-V guests with direct pass
> through of SSDs need operator intervention to turn on TRIM.

James,

Thanks for the clarification. I am talking to the folks in MSFT that develop the native scsi
stack on Windows. Hyper-V's back-end driver is not involved in SATL. I will keep you guys
posted.

Regards,

K. Y
> 
> James

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2014-07-26 13:42 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 23:06 [PATCH 1/1] Drivers: scsi: storvsc: Add blist flags K. Y. Srinivasan
2014-07-23 10:04 ` Sitsofe Wheeler
2014-07-23 11:51   ` Christoph Hellwig
2014-07-23 12:54     ` Sitsofe Wheeler
2014-07-23 14:10       ` Christoph Hellwig
2014-07-23 15:31         ` Sitsofe Wheeler
2014-07-23 15:40         ` KY Srinivasan
2014-07-23 15:39   ` KY Srinivasan
2014-07-23 14:10 ` Sitsofe Wheeler
2014-07-23 14:15   ` Christoph Hellwig
2014-07-23 20:13     ` Sitsofe Wheeler
2014-07-24  7:47       ` [PATCH 0/3] Enable discard on Hyper-V Sitsofe Wheeler
2014-07-24  7:52         ` [PATCH 1/3] [SCSI] Add quirk for forcing logical block provisioning tests Sitsofe Wheeler
2014-07-24  7:56         ` [PATCH 2/3] [SCSI] storvsc: Add Hyper-V " Sitsofe Wheeler
2014-07-24 14:09           ` James Bottomley
2014-07-24 18:03             ` Sitsofe Wheeler
2014-07-24  7:58         ` [PATCH 3/3] [SCSI] Make LBP quirk skip lbpme checks tests Sitsofe Wheeler
2014-07-24 12:22           ` [PATCH v2 " Sitsofe Wheeler
2014-07-24 13:54             ` Martin K. Petersen
2014-07-24 15:34               ` Christoph Hellwig
2014-07-24 15:35                 ` Christoph Hellwig
2014-07-24 16:24                   ` Sitsofe Wheeler
2014-07-24 15:36               ` Sitsofe Wheeler
2014-07-24 15:54                 ` Martin K. Petersen
2014-07-25 16:47                   ` KY Srinivasan
2014-07-25 16:57                     ` Martin K. Petersen
2014-07-26 13:44                       ` KY Srinivasan
2014-07-26 16:54                         ` Martin K. Petersen
2014-07-26 17:17                           ` KY Srinivasan
2014-07-26 19:25                             ` Martin K. Petersen
2014-07-27  2:09                               ` KY Srinivasan
2014-07-28 18:50                               ` KY Srinivasan
2014-07-28 19:02                                 ` Martin K. Petersen
2014-07-28 19:05                                   ` KY Srinivasan
2014-07-28 20:02                                     ` James Bottomley
2014-07-28 20:05                                       ` KY Srinivasan
2014-07-29 17:41                                       ` KY Srinivasan
2014-07-29 19:30                                         ` Martin K. Petersen
2014-07-25 17:10                     ` James Bottomley
2014-07-26 13:42                       ` KY Srinivasan [this message]
2014-07-24 12:37         ` [PATCH 0/3] Enable discard on Hyper-V Sitsofe Wheeler
2014-07-24  5:40 ` [PATCH 1/1] Drivers: scsi: storvsc: Add blist flags Hannes Reinecke
2014-08-01 19:48   ` Sitsofe Wheeler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=739c32de010444499fea6f5f47ca948d@BY2PR0301MB0711.namprd03.prod.outlook.com \
    --to=kys@microsoft.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ohering@suse.com \
    --cc=sitsofe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).