From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiVqE-0007uf-0Z for qemu-devel@nongnu.org; Tue, 01 Sep 2009 12:04:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiVq8-0007sG-Vi for qemu-devel@nongnu.org; Tue, 01 Sep 2009 12:04:17 -0400 Received: from [199.232.76.173] (port=46803 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiVq8-0007sB-O4 for qemu-devel@nongnu.org; Tue, 01 Sep 2009 12:04:12 -0400 Received: from verein.lst.de ([213.95.11.210]:39095) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MiVq8-0001xn-1O for qemu-devel@nongnu.org; Tue, 01 Sep 2009 12:04:12 -0400 Date: Tue, 1 Sep 2009 18:04:09 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 2/4] block: use fdatasync instead of fsync Message-ID: <20090901160409.GA22629@lst.de> References: <20090831201627.GA4811@lst.de> <20090831201709.GB4874@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Christoph Hellwig , qemu-devel@nongnu.org On Tue, Sep 01, 2009 at 06:59:46PM +0300, Blue Swirl wrote: > On Mon, Aug 31, 2009 at 11:17 PM, Christoph Hellwig wrote: > > > > If we are flushing the caches for our image files we only care about the > > data (including the metadata required for accessing it) but not things > > like timestamp updates. ??So use fdatasync instead of fsync to implement > > the flush operations. > > > - ?? ??fsync(s->fd); > > + ?? ??fdatasync(s->fd); > > There is no fdatasync outside of Linux, not in OpenBSD and mingw32 at > least. But you could add a probe for it to configure. Oh, okay. Kinda sad that people still don't implement useful inteface that have been in Posix for a long time.