From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1KiW-0001J3-8d for qemu-devel@nongnu.org; Tue, 05 May 2009 09:29:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1KiR-0001EX-EV for qemu-devel@nongnu.org; Tue, 05 May 2009 09:29:51 -0400 Received: from [199.232.76.173] (port=52852 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1KiQ-0001EM-R7 for qemu-devel@nongnu.org; Tue, 05 May 2009 09:29:46 -0400 Received: from verein.lst.de ([213.95.11.210]:60938) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1M1KiQ-0003AC-A1 for qemu-devel@nongnu.org; Tue, 05 May 2009 09:29:46 -0400 Date: Tue, 5 May 2009 15:29:44 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 2/3] barriers: block-raw-posix barrier support Message-ID: <20090505132944.GA3416@lst.de> References: <20090505120804.GA30651@lst.de> <20090505120836.GB30721@lst.de> <20090505123311.GD25328@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090505123311.GD25328@shareable.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: Christoph Hellwig , qemu-devel@nongnu.org On Tue, May 05, 2009 at 01:33:11PM +0100, Jamie Lokier wrote: > You don't need two fdatasyncs if the barrier request is just a > barrier, no data write, used only to flush previously written data by > a guest's fsync/fdatasync implementation. Yeah. I'll put that optimization in after some testing. > This is the best argument yet for having distinct "barrier" and "sync" > operations. "Barrier" is for ordering I/O, such as journalling > filesystems. Doesn't really help as long as we're using the normal Posix filesystem APIs on the host. The only way to guarantee ordering of multiple *write* systen calls is to call f(data)sync between them.