* USB storage & write barrier support?
@ 2009-11-23 20:12 Ric Wheeler
2009-11-23 20:37 ` Alan Stern
0 siblings, 1 reply; 5+ messages in thread
From: Ric Wheeler @ 2009-11-23 20:12 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-fsdevel
Hi Alan,
One quick question - how robust is our support for write barriers over USB?
Specifically, I am looking to get together some testing with both
external USB and e-sata enclosure for various file systems and would be
very interested in helping make sure that this is well handled...
Best regards,
Ric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: USB storage & write barrier support?
2009-11-23 20:12 USB storage & write barrier support? Ric Wheeler
@ 2009-11-23 20:37 ` Alan Stern
2009-11-23 20:46 ` Ric Wheeler
0 siblings, 1 reply; 5+ messages in thread
From: Alan Stern @ 2009-11-23 20:37 UTC (permalink / raw)
To: Ric Wheeler; +Cc: linux-fsdevel
On Mon, 23 Nov 2009, Ric Wheeler wrote:
> Hi Alan,
>
> One quick question - how robust is our support for write barriers over USB?
>
> Specifically, I am looking to get together some testing with both
> external USB and e-sata enclosure for various file systems and would be
> very interested in helping make sure that this is well handled...
It's extremely robust -- the USB mass-storage driver has a maximum
command-queue length of 1!
With the coming of USB 3.0 and the UASP (USB-Attached SCSI Protocol)
specification this will change. I presume barriers will then be
implemented as the need arises.
Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: USB storage & write barrier support?
2009-11-23 20:37 ` Alan Stern
@ 2009-11-23 20:46 ` Ric Wheeler
2009-11-23 20:49 ` Alan Stern
0 siblings, 1 reply; 5+ messages in thread
From: Ric Wheeler @ 2009-11-23 20:46 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-fsdevel
On 11/23/2009 03:37 PM, Alan Stern wrote:
> On Mon, 23 Nov 2009, Ric Wheeler wrote:
>
>> Hi Alan,
>>
>> One quick question - how robust is our support for write barriers over USB?
>>
>> Specifically, I am looking to get together some testing with both
>> external USB and e-sata enclosure for various file systems and would be
>> very interested in helping make sure that this is well handled...
>
> It's extremely robust -- the USB mass-storage driver has a maximum
> command-queue length of 1!
>
> With the coming of USB 3.0 and the UASP (USB-Attached SCSI Protocol)
> specification this will change. I presume barriers will then be
> implemented as the need arises.
>
> Alan
>
What we need is to pass down cache flush commands (ATA_CACHE_FLUSH_EXT is what
flushed the cache for ATA/S-ATA devices). Even with a command-queue length of 1,
the write cache a USB connected s-ata drive would still loose data on power off
without this kind of support.
Ric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: USB storage & write barrier support?
2009-11-23 20:46 ` Ric Wheeler
@ 2009-11-23 20:49 ` Alan Stern
2009-11-23 20:57 ` Ric Wheeler
0 siblings, 1 reply; 5+ messages in thread
From: Alan Stern @ 2009-11-23 20:49 UTC (permalink / raw)
To: Ric Wheeler; +Cc: linux-fsdevel
On Mon, 23 Nov 2009, Ric Wheeler wrote:
> What we need is to pass down cache flush commands (ATA_CACHE_FLUSH_EXT is what
> flushed the cache for ATA/S-ATA devices). Even with a command-queue length of 1,
> the write cache a USB connected s-ata drive would still loose data on power off
> without this kind of support.
You can't send ATA commands directly over a USB connection without
using a passthru protocol of some sort. Some of the USB interfaces in
various drive enclosures support such a protocol but a lot of them
don't.
Of course, you _can_ send SCSI's SYNCHRONIZE CACHE command. What
ATA/SATA command (if any) the drive's USB interface will translate it
into is known only to the interface's manufacturer. Nevertheless,
that's what we've been depending on because that's what the sd driver
uses.
Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: USB storage & write barrier support?
2009-11-23 20:49 ` Alan Stern
@ 2009-11-23 20:57 ` Ric Wheeler
0 siblings, 0 replies; 5+ messages in thread
From: Ric Wheeler @ 2009-11-23 20:57 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-fsdevel
On 11/23/2009 03:49 PM, Alan Stern wrote:
> On Mon, 23 Nov 2009, Ric Wheeler wrote:
>
>> What we need is to pass down cache flush commands (ATA_CACHE_FLUSH_EXT is what
>> flushed the cache for ATA/S-ATA devices). Even with a command-queue length of 1,
>> the write cache a USB connected s-ata drive would still loose data on power off
>> without this kind of support.
>
> You can't send ATA commands directly over a USB connection without
> using a passthru protocol of some sort. Some of the USB interfaces in
> various drive enclosures support such a protocol but a lot of them
> don't.
>
> Of course, you _can_ send SCSI's SYNCHRONIZE CACHE command. What
> ATA/SATA command (if any) the drive's USB interface will translate it
> into is known only to the interface's manufacturer. Nevertheless,
> that's what we've been depending on because that's what the sd driver
> uses.
>
> Alan
>
That makes sense - so the usb storage stack does the right thing, what happens
is up to the SCSI -> ATA translation in the target device.
If I still had occasional access to analyzers, we could always test & verify
that some of the common enclosures work correctly but I have unfortunately lost
my toys :-)
Thanks!
Ric
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-23 20:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-23 20:12 USB storage & write barrier support? Ric Wheeler
2009-11-23 20:37 ` Alan Stern
2009-11-23 20:46 ` Ric Wheeler
2009-11-23 20:49 ` Alan Stern
2009-11-23 20:57 ` Ric Wheeler
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).