Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760051AbZCZSdN (ORCPT ); Thu, 26 Mar 2009 14:33:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756094AbZCZSc5 (ORCPT ); Thu, 26 Mar 2009 14:32:57 -0400 Received: from brick.kernel.dk ([93.163.65.50]:54626 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755302AbZCZSc5 (ORCPT ); Thu, 26 Mar 2009 14:32:57 -0400 Date: Thu, 26 Mar 2009 19:32:54 +0100 From: Jens Axboe To: Hugh Dickins Cc: Ric Wheeler , Jeff Garzik , Linus Torvalds , Theodore Tso , Ingo Molnar , Alan Cox , Arjan van de Ven , Andrew Morton , Peter Zijlstra , Nick Piggin , David Rees , Jesper Krogh , Linux Kernel Mailing List Subject: Re: Linux 2.6.29 Message-ID: <20090326183254.GI27476@kernel.dk> References: <20090325093913.GJ27476@kernel.dk> <49CA86BD.6060205@garzik.org> <20090325194341.GB27476@kernel.dk> <49CA8ADA.3040709@redhat.com> <20090325195747.GC27476@kernel.dk> <20090326085748.GH27476@kernel.dk> <20090326154610.GH27476@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2316 Lines: 52 On Thu, Mar 26 2009, Hugh Dickins wrote: > On Thu, 26 Mar 2009, Jens Axboe wrote: > > On Thu, Mar 26 2009, Hugh Dickins wrote: > > > On Thu, 26 Mar 2009, Jens Axboe wrote: > > > > On Wed, Mar 25 2009, Hugh Dickins wrote: > > > > > > > > > > Tangential question, but am I right in thinking that BIO_RW_BARRIER > > > > > similarly bars across all partitions, whereas its WRITE_BARRIER and > > > > > DISCARD_BARRIER users would actually prefer it to apply to just one? > > > > > > > > All the barriers refer to just that range which the barrier itself > > > > references. > > > > > > Ah, thank you: then I had a fundamental misunderstanding of them, > > > and need to go away and work that out some more. > > > > > > Though I didn't read it before asking, doesn't the I/O Barriers section > > > of Documentation/block/biodoc.txt give a very different impression? > > > > I'm sensing a miscommunication here... The ordering constraint is across > > devices, at least that is how it is implemented. For file system > > barriers (like BIO_RW_BARRIER), it could be per-partition instead. Doing > > so would involve some changes at the block layer side, not necessarily > > trivial. So I think you were asking about ordering, I was answering > > about the write guarantee :-) > > Ah, thank you again, perhaps I did understand after all. > > So, directing a barrier (WRITE_BARRIER or DISCARD_BARRIER) to a range > of sectors in one partition interposes a barrier into the queue of I/O > across (all partitions of) that whole device. Correct > I think that's not how filesystems really want barriers to behave, > and might tend to discourage us from using barriers more freely. > But I have zero appreciation of whether it's a significant issue > worth non-trivial change - just wanted to get it out into the open. Per-partition definitely makes sense. The problem is that we do sorting on a per-device basis right now. But it's a good point, I'll try and take a look at how much work it would be to make it per-partition instead. It wont be trivial :-) -- Jens Axboe -- 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/