WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] Add support for barriers to blk{back,front} driv

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] Add support for barriers to blk{back,front} drivers.
From: Gerd Hoffmann <kraxel@xxxxxxx>
Date: Mon, 30 Oct 2006 13:43:08 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 30 Oct 2006 04:43:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <8A87A9A84C201449A0C56B728ACF491E932E@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8A87A9A84C201449A0C56B728ACF491E932E@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20060911)
  Hi,

> What block devices currently support barriers? I assume device mapper
> does (if the underlying devices do), but loop presumably doesn't. 

ide does, sata does (at least ide also depending on disk capabilities),
lvm on top of these does too.

loop doesn't, I have a patch in the queue though:
http://www.suse.de/~kraxel/patches/kraxel-unstable-zweiblum-hg11870-quilt/loop-barrier.diff

>> The error is also propagated to the frontend so it knows 
>> barriers don't work (and can in turn propagate that up to the 
>> filesystem driver), the new BLKIF_RSP_EOPNOTSUPP error code 
>> is needed for that.
> 
> Do you do a probe at backendd initialisation time to avoid telling the
> frontend that barriers are supported and then having to tell it they are
> not the first time it tries to use one? Althoug Linux may be happy with
> that its not a clean interface.

Well, there is no way around that.  The only way to probe this reliably
is to actually submit a barrier request to the hardware and see if they
work ok (due to some buggy drives, telling they support the required
features but grok if such a request is submitted).

There are likely cases where it is possible to figure it in advance and
avoid the "submit barrier req and see it fail" roundtrip.  Havn't
investigated that.  I'd prefer to have *one* code path only, if you have
two the unlikely of them tends to get much less tested ...

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@xxxxxxx>
http://www.suse.de/~kraxel/julika-dora.jpeg

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel