Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762004AbXE1Sdj (ORCPT ); Mon, 28 May 2007 14:33:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751863AbXE1Sd2 (ORCPT ); Mon, 28 May 2007 14:33:28 -0400 Received: from brick.kernel.dk ([80.160.20.94]:11050 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbXE1Sd1 (ORCPT ); Mon, 28 May 2007 14:33:27 -0400 Date: Mon, 28 May 2007 20:32:52 +0200 From: Jens Axboe To: Phillip Susi Cc: device-mapper development , David Chinner , linux-fsdevel@vger.kernel.org, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [dm-devel] Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md. Message-ID: <20070528183252.GH7653@kernel.dk> References: <18006.38689.818186.221707@notabene.brown> <20070525111557.GP85884050@sgi.com> <20070525114910.GQ7653@kernel.dk> <4656F783.3000603@cfl.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4656F783.3000603@cfl.rr.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2051 Lines: 45 (dunny why you explicitly dropped me off the cc/to list when replying to my email, hence I missed it for 3 days) On Fri, May 25 2007, Phillip Susi wrote: > Jens Axboe wrote: > >A barrier write will include a flush, but it may also use the FUA bit to > >ensure data is on platter. So the only situation where a fallback from a > >barrier to flush would be valid, is if the device lied and told you it > >could do FUA but it could not and that is the reason why the barrier > >write failed. If that is the case, the block layer should stop using FUA > >and fallback to flush-write-flush. And if it does that, then there's > >never a valid reason to switch from using barrier writes to > >blkdev_issue_flush() since both methods would either both work or both > >fail. > > IIRC, the FUA bit only forces THAT request to hit the platter before it > is completed; it does not flush any previous requests still sitting in > the write back queue. Because all io before the barrier must be on the > platter as well, setting the FUA bit on the barrier request means you > don't have to follow it with a flush, but you still have to precede it > with a flush. I'm well aware of how FUA works, hence the barrier FUA implementation does flush and then write-fua. The win compared to flush-write-flush is just a saved command, essentially. > >It's not block layer breakage, it's a device issue. > > How isn't it block layer breakage? If the device does not support > barriers, isn't it the job of the block layer ( probably the scheduler ) > to fall back to flush-write-flush? The problem is flush not working, the block layer can't fix that for you obviously. If it's FUA not working, the block layer should fall back to flush-write-flush, as they are obviously functionally equivalent. -- 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/