From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH, RFC] virtio_blk: add cache flush command Date: Tue, 12 May 2009 11:35:23 +0300 Message-ID: <4A0934CB.1000601@redhat.com> References: <20090511083908.GB20082@lst.de> <4A083B7C.1000703@codemonkey.ws> <20090511154046.GA4226@lst.de> <4A08482E.30100@redhat.com> <20090511162810.GA6027@lst.de> <4A085721.2050005@redhat.com> <20090512071950.GA5627@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Rusty Russell , kvm@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37587 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756662AbZELIfb (ORCPT ); Tue, 12 May 2009 04:35:31 -0400 In-Reply-To: <20090512071950.GA5627@lst.de> Sender: kvm-owner@vger.kernel.org List-ID: Christoph Hellwig wrote: > On Mon, May 11, 2009 at 07:49:37PM +0300, Avi Kivity wrote: > >> Maybe we should add a fourth cache= mode then. But >> cache=writeback+fsync doesn't correspond to any real world drive; in the >> real world you're limited to power failures and a few megabytes of cache >> (typically less), cache=writeback+fsync can lose hundreds of megabytes >> due to power loss or software failure. >> > > cache=writeback+fsync is exactly the same model as a normal writeback > cache disk drive. (Well, almost as we currently don't use tag ordering > but drain flushes as a Linux implementation detail, but the disks also > support TCQ-based ordering). > > The cache size on disks is constantly growing, and if you lose cache > it doesn't really matter how much you lose but what you lose. > Software errors won't cause data loss on a real disk (firmware bugs will, but the firmware is less likely to crash than the host OS). >> Oh, and cache=writeback+fsync doesn't work on qcow2, unless we add fsync >> after metadata updates. >> > > If you care about data integrity in case of crashes qcow2 doesn't work > at all. > Do you known of any known corruptors in qcow2 with cache=writethrough? -- error compiling committee.c: too many arguments to function