From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH, RFC] virtio_blk: add cache flush command Date: Mon, 18 May 2009 14:06:12 +0200 Message-ID: <20090518120612.GC11112@lst.de> 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> <4A0934CB.1000601@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Anthony Liguori , Rusty Russell , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from verein.lst.de ([213.95.11.210]:36384 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755317AbZERMGc (ORCPT ); Mon, 18 May 2009 08:06:32 -0400 Content-Disposition: inline In-Reply-To: <4A0934CB.1000601@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, May 12, 2009 at 11:35:23AM +0300, Avi Kivity wrote: > >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). OS crash or hardware crash really makes no difference for writeback caches. The case we are trying to protect against here is any crash, and a hardware induced one or power failure is probably more likely in either case than a software failure in either the OS or firmware. > >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? It's not related to cache=writethrough. The issue is that there are no transactional guarantees in qcow2.