[Top] [All Lists]

Re: Device loses barrier support (was: Fixed patch for simple barriers.)

To: Andi Kleen <andi@xxxxxxxxxxxxxx>
Subject: Re: Device loses barrier support (was: Fixed patch for simple barriers.)
From: Mikulas Patocka <mpatocka@xxxxxxxxxx>
Date: Thu, 4 Dec 2008 20:16:23 -0500 (EST)
Cc: linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, Alasdair G Kergon <agk@xxxxxxxxxx>, Andi Kleen <andi-suse@xxxxxxxxxxxxxx>, Milan Broz <mbroz@xxxxxxxxxx>
In-reply-to: <20081205004849.GX6703@xxxxxxxxxxxxxxxxxx>
References: <20081204100050.GN6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812040836480.6118@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081204142015.GQ6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812040913510.6118@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081204145810.GR6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812041139200.2434@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081204174838.GS6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812041401210.23079@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081204221551.GV6703@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.64.0812041756550.29638@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20081205004849.GX6703@xxxxxxxxxxxxxxxxxx>
On Fri, 5 Dec 2008, Andi Kleen wrote:

> > And if barriers fail at random points, the user can't turn on disk cache 
> > anyway (he would get data corruption if barrier write failed and hardware 
> I think we already established earlier in the thread that there is no disk
> corruption

So, the facts are:

* barrier support in md-raid1 deviates from the specification at 
Documentation/block/barrier.txt. The specification says that requests 
submitted after the barrier request hit the media after the barrier 
request hits the media. The reality is that the barrier request can be 
randomly aborted and the requests submitted after it hit the media before 
the barrier request.

* the filesystems developed hacks to work around this issue, the hacks 
involve not submitting more requests after the barrier request, 
synchronously waiting for the barrier request and eventually retrying it. 
These hacks suppress any performance advantage barriers could bring.

* you submit a patch that makes barriers even more often deviate from the 
specification and you argue that the patch is correct because filesystems 
handle this deviation.

This is runaway logic that will eventually turn Linux into unmaintainable 
mess. What do you think we'll be doing when we'll be implementing barriers 
into other dm targets? Do you really think it'll be fun to write code to 
double-submit all metadata writes just because you and some person at 
md-raid1 provided an unreliable interface?

I am again repeating: either make barriers consistent with the 
specification, or remove them at all.


<Prev in Thread] Current Thread [Next in Thread>