From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpnVL-00074G-Hu for qemu-devel@nongnu.org; Tue, 14 Oct 2008 13:16:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpnVK-00073R-0z for qemu-devel@nongnu.org; Tue, 14 Oct 2008 13:16:19 -0400 Received: from [199.232.76.173] (port=47555 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpnVJ-00073K-ML for qemu-devel@nongnu.org; Tue, 14 Oct 2008 13:16:17 -0400 Received: from mx2.redhat.com ([66.187.237.31]:58963) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KpnVJ-000093-4C for qemu-devel@nongnu.org; Tue, 14 Oct 2008 13:16:17 -0400 Message-ID: <48F4D3A9.2070207@redhat.com> Date: Tue, 14 Oct 2008 19:15:21 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] Disk integrity in QEMU References: <48EE38B9.2050106@codemonkey.ws> <48EF0A26.90209@redhat.com> <1223626368.3618.26.camel@blaa> <20081012231042.GB22509@shareable.org> In-Reply-To: <20081012231042.GB22509@shareable.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Cc: Chris Wright , Mark McLoughlin , kvm-devel , Laurent Vivier , Ryan Harper , Gerd Hoffmann Jamie Lokier wrote: > However, should the effect of the guest turning off the IDE disk write > cache perhaps be identical to the guest issuing IDE cache flush commands > following every IDE write? > > This could mean the host calling fdatasync, or fsync, or using > O_DSYNC, or O_DIRECT - whatever the host does for IDE flush cache. > > What this means _exactly_ for data integrity is outside of qemu's > control and is a user & host configuration issue. But qemu could > provide consistency at least. > We should completely ignore the guest IDE write cache. It was brought into life by the deficiencies of IDE which presented the user with an impossible tradeoff -- you can choose between data loss and horrible performance. Since modern hardware doesn't require this tradeoff, there is no reason to force the user to make these choices. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.