From: Rusty Russell Subject: Re: Notes on block I/O data integrity Date: Thu, 27 Aug 2009 20:21:55 +0930 Message-ID: <200908272021.56219.rusty@rustcorp.com.au> References: <20090825181120.GA4863@lst.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: Christoph Hellwig Return-path: Received: from ozlabs.org ([203.10.76.45]:46905 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbZH0Kv4 convert rfc822-to-8bit (ORCPT ); Thu, 27 Aug 2009 06:51:56 -0400 In-Reply-To: <20090825181120.GA4863@lst.de> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 26 Aug 2009 03:41:20 am Christoph Hellwig wrote: > As various people wanted to know how the various data integrity patches > I've send out recently play together here's a small writeup on what > issues we have in QEMU and how to fix it: Classic mail. Thanks for the massive and coherent clue injection! > Action plan for the guest drivers: > > - virtio-blk needs to advertise ordered queue by default. > This makes cache=writethrough safe on virtio. >From a guest POV, that's "we don't know, let's say we're ordered because that may make us safer". Of course, it may not help: how much does it cost to drain the queue? The bug, IMHO is that we *should* know. And in future I'd like to fix that, either by adding an VIRTIO_BLK_F_ORDERED feature, or a VIRTIO_BLK_F_UNORDERED feature. > Action plan for QEMU: > > - IDE needs to set the write cache enabled bit > - virtio needs to implement a cache flush command and advertise it > (also needs a small change to the host driver) So, virtio-blk needs to be enhanced for this as well. Thanks! Rusty.