From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JTzFx-0005hW-DE for qemu-devel@nongnu.org; Tue, 26 Feb 2008 07:50:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JTzFv-0005gU-Qa for qemu-devel@nongnu.org; Tue, 26 Feb 2008 07:50:01 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTzFv-0005gR-CN for qemu-devel@nongnu.org; Tue, 26 Feb 2008 07:49:59 -0500 Received: from mail2.shareable.org ([80.68.89.115]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JTzFv-0003wl-85 for qemu-devel@nongnu.org; Tue, 26 Feb 2008 07:49:59 -0500 Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from ) id 1JTzFt-0003jR-17 for qemu-devel@nongnu.org; Tue, 26 Feb 2008 12:49:57 +0000 Date: Tue, 26 Feb 2008 12:49:56 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] ide.c make write cacheing controllable by guest Message-ID: <20080226124956.GA13669@shareable.org> References: <18371.1341.577787.909764@mariner.uk.xensource.com> <20080225205040.GA18613@shareable.org> <18372.748.889104.623158@mariner.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18372.748.889104.623158@mariner.uk.xensource.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Ian Jackson wrote: > > Ideally, the host would provide variation of fdatasync() which flushes > > data to hard storage in the same way that kernel filesystem journal > > writes can do, and Qemu would use that. > > Another question arises: do we want bdrv_flush to call (eventually) > fsync or fdatasync ? If the latter we need to make sure that we call > fsync instead when necessary, for example when a cow file is extended. I'm imagining that fdatasync() will flush the necessary metadata, including file size, when a file is extended. As would O_DSYNC. I could be wrong, but I think it's expected to do that, as I recall VxFS doing something like that with O_DSYNC. Then again, even if it's meant to, that doesn't mean it does... -- Jamie