From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ric Wheeler Subject: Re: USB storage & write barrier support? Date: Mon, 23 Nov 2009 15:46:03 -0500 Message-ID: <4B0AF48B.1090904@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org To: Alan Stern Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18431 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754015AbZKWUlB (ORCPT ); Mon, 23 Nov 2009 15:41:01 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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