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: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] Add support for barriers to blk{back,front} drivers.
From: Gerd Hoffmann <kraxel@xxxxxxx>
Date: Thu, 09 Nov 2006 13:48:49 +0100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 09 Nov 2006 04:49:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1789EC9.40F2%Keir.Fraser@xxxxxxxxxxxx>
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: <C1789EC9.40F2%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20060911)
Keir Fraser wrote:
> What happens (even on native Linux) if you have, say, a RAID array in which
> some of the discs support barriers and others don't?

The raid0 driver doesn't support barriers in the first place.  Not sure
about the other raid drivers.

> Or you have a RAID-0 set, so that some barrier
> writes can succeed and others can't:

I think that can never ever happen.  To maintain correct barrier
semantics for the complete raid0 it is not enough to simply pass down
the barrier request to the disk which happens to hold the block in
question.  You have to somehow synchronize the disks as well.

> must the filesystem handle
> barrier_write failures at any time?

The linux filesystems do.  The usual way to handle the error is to
submit the request again as normal request and turn off the barrier flag
so the filesystem driver wouldn't use barrier requests again (and enter
fallback mode).  It doesn't matter whenever that happens on the very
first or any subsequent barrier write request.

As far I know barriers are always a all-or-nothing thingy.  Either they
work or they don't.  Only problem is that there is no reliable way to
figure without actually submitting a barrier request.  I don't like it
that much either, but the existing hardware forces us to handle it that
way.  Life sucks sometimes ...

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