Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-19 Thread Austin S. Hemmelgarn
On 2016-09-17 01:14, James Bottomley wrote: On Fri, 2016-09-16 at 13:06 -0400, Austin S. Hemmelgarn wrote: On 2016-09-16 12:21, James Bottomley wrote: On Fri, 2016-09-16 at 11:53 -0400, Austin S. Hemmelgarn wrote: On 2016-09-16 07:16, Hannes Reinecke wrote: On 09/15/2016 10:52 PM, Jason A.

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-19 Thread Austin S. Hemmelgarn
On 2016-09-17 01:14, James Bottomley wrote: On Fri, 2016-09-16 at 13:06 -0400, Austin S. Hemmelgarn wrote: On 2016-09-16 12:21, James Bottomley wrote: On Fri, 2016-09-16 at 11:53 -0400, Austin S. Hemmelgarn wrote: On 2016-09-16 07:16, Hannes Reinecke wrote: On 09/15/2016 10:52 PM, Jason A.

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread James Bottomley
On Fri, 2016-09-16 at 13:06 -0400, Austin S. Hemmelgarn wrote: > On 2016-09-16 12:21, James Bottomley wrote: > > On Fri, 2016-09-16 at 11:53 -0400, Austin S. Hemmelgarn wrote: > > > On 2016-09-16 07:16, Hannes Reinecke wrote: > > > > On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: > > > > > Hi

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread James Bottomley
On Fri, 2016-09-16 at 13:06 -0400, Austin S. Hemmelgarn wrote: > On 2016-09-16 12:21, James Bottomley wrote: > > On Fri, 2016-09-16 at 11:53 -0400, Austin S. Hemmelgarn wrote: > > > On 2016-09-16 07:16, Hannes Reinecke wrote: > > > > On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: > > > > > Hi

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread Jason A. Donenfeld
On Fri, Sep 16, 2016 at 7:06 PM, Austin S. Hemmelgarn wrote: > 1. UAS (not some other SCSI transport) without UNMAP support. > 2. Supports ATA_12 or ATA_16 pass through. > 3. ATA DEVICE IDENTIFY via SAT indicates that the device supports > DISCARD/TRIM. > Then we'd be

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread Jason A. Donenfeld
On Fri, Sep 16, 2016 at 7:06 PM, Austin S. Hemmelgarn wrote: > 1. UAS (not some other SCSI transport) without UNMAP support. > 2. Supports ATA_12 or ATA_16 pass through. > 3. ATA DEVICE IDENTIFY via SAT indicates that the device supports > DISCARD/TRIM. > Then we'd be matching behavior on

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread Austin S. Hemmelgarn
On 2016-09-16 12:21, James Bottomley wrote: On Fri, 2016-09-16 at 11:53 -0400, Austin S. Hemmelgarn wrote: On 2016-09-16 07:16, Hannes Reinecke wrote: On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: Hi Martin, On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen But how do they signal that

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread Austin S. Hemmelgarn
On 2016-09-16 12:21, James Bottomley wrote: On Fri, 2016-09-16 at 11:53 -0400, Austin S. Hemmelgarn wrote: On 2016-09-16 07:16, Hannes Reinecke wrote: On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: Hi Martin, On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen But how do they signal that

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread James Bottomley
On Fri, 2016-09-16 at 11:53 -0400, Austin S. Hemmelgarn wrote: > On 2016-09-16 07:16, Hannes Reinecke wrote: > > On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: > > > Hi Martin, > > > > > > On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen > > > > But how do they signal that ATA passthrough

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread James Bottomley
On Fri, 2016-09-16 at 11:53 -0400, Austin S. Hemmelgarn wrote: > On 2016-09-16 07:16, Hannes Reinecke wrote: > > On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: > > > Hi Martin, > > > > > > On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen > > > > But how do they signal that ATA passthrough

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread Austin S. Hemmelgarn
On 2016-09-16 07:16, Hannes Reinecke wrote: On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: Hi Martin, On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen But how do they signal that ATA passthrough is possible? Is there an ATA Information VPD page? Is REPORT SUPPORTED OPERATION CODES

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread Austin S. Hemmelgarn
On 2016-09-16 07:16, Hannes Reinecke wrote: On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: Hi Martin, On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen But how do they signal that ATA passthrough is possible? Is there an ATA Information VPD page? Is REPORT SUPPORTED OPERATION CODES

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread Hannes Reinecke
On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: > Hi Martin, > > On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen >> But how do they signal that ATA passthrough is possible? Is there an ATA >> Information VPD page? Is REPORT SUPPORTED OPERATION CODES supported? >> >> We need really solid

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-16 Thread Hannes Reinecke
On 09/15/2016 10:52 PM, Jason A. Donenfeld wrote: > Hi Martin, > > On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen >> But how do they signal that ATA passthrough is possible? Is there an ATA >> Information VPD page? Is REPORT SUPPORTED OPERATION CODES supported? >> >> We need really solid

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-15 Thread Jason A. Donenfeld
Hi Martin, On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen > But how do they signal that ATA passthrough is possible? Is there an ATA > Information VPD page? Is REPORT SUPPORTED OPERATION CODES supported? > > We need really solid discovery data before we can entertain enabling > something

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-15 Thread Jason A. Donenfeld
Hi Martin, On Thu, Sep 15, 2016 at 6:07 PM, Martin K. Petersen > But how do they signal that ATA passthrough is possible? Is there an ATA > Information VPD page? Is REPORT SUPPORTED OPERATION CODES supported? > > We need really solid discovery data before we can entertain enabling > something

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-15 Thread Martin K. Petersen
> "Jason" == Jason A Donenfeld writes: Jason, >> How do they signal that they support the passthrough? Jason> Through the usual SCSI ATA-passthrough interface, "SAT" (SCSI-ATA Jason> Command Translation) -- ATA PASS THROUGH SCSI (16) and ATA PASS Jason> THROUGH SCSI (12).

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-15 Thread Martin K. Petersen
> "Jason" == Jason A Donenfeld writes: Jason, >> How do they signal that they support the passthrough? Jason> Through the usual SCSI ATA-passthrough interface, "SAT" (SCSI-ATA Jason> Command Translation) -- ATA PASS THROUGH SCSI (16) and ATA PASS Jason> THROUGH SCSI (12). But how do they

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-15 Thread Jason A. Donenfeld
On Wed, Sep 14, 2016 at 8:37 PM, Martin K. Petersen > How do they signal that they support the passthrough? Through the usual SCSI ATA-passthrough interface, "SAT" (SCSI-ATA Command Translation) -- ATA PASS THROUGH SCSI (16) and ATA PASS THROUGH SCSI (12). I can use hdparm to treat /dev/sdb

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-15 Thread Jason A. Donenfeld
On Wed, Sep 14, 2016 at 8:37 PM, Martin K. Petersen > How do they signal that they support the passthrough? Through the usual SCSI ATA-passthrough interface, "SAT" (SCSI-ATA Command Translation) -- ATA PASS THROUGH SCSI (16) and ATA PASS THROUGH SCSI (12). I can use hdparm to treat /dev/sdb

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-14 Thread Martin K. Petersen
> "Jason" == Jason A Donenfeld writes: Jason, Jason> These USB enclosures do not support SCSI UNMAP. However, they do Jason> support ATA-passthrough, and `hdparm -I` shows that TRIM is Jason> supported. How do they signal that they support the passthrough? -- Martin K.

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-14 Thread Martin K. Petersen
> "Jason" == Jason A Donenfeld writes: Jason, Jason> These USB enclosures do not support SCSI UNMAP. However, they do Jason> support ATA-passthrough, and `hdparm -I` shows that TRIM is Jason> supported. How do they signal that they support the passthrough? -- Martin K. Petersen

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-13 Thread Henrique de Moraes Holschuh
On Mon, 12 Sep 2016, Jason A. Donenfeld wrote: > I was wondering if it'd be possible to have the uas driver -- or > perhaps somewhere else in the stack -- fall back to using > ATA-passthrough-TRIM for UNMAP, so that discard can work properly. > AFAIK, the Windows drivers do exactly this. > > If

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-13 Thread Henrique de Moraes Holschuh
On Mon, 12 Sep 2016, Jason A. Donenfeld wrote: > I was wondering if it'd be possible to have the uas driver -- or > perhaps somewhere else in the stack -- fall back to using > ATA-passthrough-TRIM for UNMAP, so that discard can work properly. > AFAIK, the Windows drivers do exactly this. > > If

TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-12 Thread Jason A. Donenfeld
Hi folks, There's a huge quantity of USB enclosures flooding the market for quite sometime that support UASP, which is very nice. This allows for higher speeds by using the SCSI command set via the uas driver, and offers various other advantages over the classic usb-storage driver. These USB

TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-12 Thread Jason A. Donenfeld
Hi folks, There's a huge quantity of USB enclosures flooding the market for quite sometime that support UASP, which is very nice. This allows for higher speeds by using the SCSI command set via the uas driver, and offers various other advantages over the classic usb-storage driver. These USB