Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756554AbYLDQqc (ORCPT ); Thu, 4 Dec 2008 11:46:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752541AbYLDQqY (ORCPT ); Thu, 4 Dec 2008 11:46:24 -0500 Received: from mx1.redhat.com ([66.187.233.31]:37199 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528AbYLDQqX (ORCPT ); Thu, 4 Dec 2008 11:46:23 -0500 Date: Thu, 4 Dec 2008 11:45:44 -0500 (EST) From: Mikulas Patocka X-X-Sender: mpatocka@hs20-bc2-1.build.redhat.com To: Andi Kleen cc: linux-kernel@vger.kernel.org, xfs@oss.sgi.com, Alasdair G Kergon , Andi Kleen , Milan Broz Subject: Re: Device loses barrier support (was: Fixed patch for simple barriers.) In-Reply-To: <20081204145810.GR6703@one.firstfloor.org> Message-ID: References: <20081204100050.GN6703@one.firstfloor.org> <20081204142015.GQ6703@one.firstfloor.org> <20081204145810.GR6703@one.firstfloor.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1692 Lines: 50 > > > > finished after the 2nd write) and you are in an interrupt context, where > > > > you can't reissue -EOPNOTSUPP request. So what do you want to do? > > > > > > The barrier aware file systems I know of just resubmit synchronously when > > > a barrier fails. > > > > ... and produce structure corruption for certain period in time, because > > the writes meant to be ordered are submitted unordered. > > No there is nothing unordered. The file system path typically looks like > > commit of a transaction > if (i have never seen a barrier failing) > write block with barrier > if (EOPNOTSUPP) { > record failure > submit synchronously > } > } else > submit synchronously > If you view this as a "right" way of using barriers, then you can drop barrier support at all and replace this code sequence with: flush disk cache submit write synchronously flush disk cache --- because synchronous barriers bring you no performance advantage over the above sequence. > So if a pvmove barrier fails it will just submit synchronously. > > The write block with barrier bit varies, jbd/gfs2 do it synchronously > too and xfs does it asynchronously (with io done callbacks), but And how does xfs preserve write ordering, if the barrier asynchronously fails with -EOPNOTSUPP and there are other writes submitted after the barrier? > in both cases they handle an EOPNOTSUPP comming out in the final > io done. Mikulas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/