From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39912 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBkxT-0004GF-Ug for qemu-devel@nongnu.org; Tue, 11 May 2010 04:36:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBkxS-0006kE-AT for qemu-devel@nongnu.org; Tue, 11 May 2010 04:36:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14949) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBkxR-0006k1-UR for qemu-devel@nongnu.org; Tue, 11 May 2010 04:36:54 -0400 Message-ID: <4BE91708.7050307@redhat.com> Date: Tue, 11 May 2010 10:36:24 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1273528310-7051-1-git-send-email-agraf@suse.de> <1273528310-7051-2-git-send-email-agraf@suse.de> <1273528310-7051-3-git-send-email-agraf@suse.de> In-Reply-To: <1273528310-7051-3-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org, hch@lst.de Am 10.05.2010 23:51, schrieb Alexander Graf: > Usually the guest can tell the host to flush data to disk. In some cases we > don't want to flush though, but try to keep everything in cache. > > So let's add a new parameter to -drive that allows us to set the flushing > behavior to "on" or "off", defaulting to enabling the guest to flush. > > Signed-off-by: Alexander Graf What about another cache=... value instead of adding more options? I'm quite sure you'll only ever need this with writeback caching. So we could have cache=none|writethrough|writeback|wb-noflush or something like that. > --- > block/raw-posix.c | 13 +++++++++++++ This is obviously wrong. If you want to introduce new behaviour to the block layer, you must do it consistently and not just for one block driver. So these changes should be made to the generic functions in block.c instead. Kevin