From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: [Qemu-devel] [PATCH] qemu-img: Add cache command line option Date: Mon, 20 Jun 2011 16:47:39 +0200 Message-ID: <4DFF5D8B.80600@redhat.com> References: <4DF8A4FD.6050807@redhat.com> <1308145570-18364-1-git-send-email-fsimonce@redhat.com> <20110616142809.GA9468@lst.de> <4DFA168B.9030808@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Federico Simoncelli , qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com To: Christoph Hellwig Return-path: Received: from mx1.redhat.com ([209.132.183.28]:25602 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755009Ab1FTOou (ORCPT ); Mon, 20 Jun 2011 10:44:50 -0400 In-Reply-To: <4DFA168B.9030808@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 16.06.2011 16:43, schrieb Kevin Wolf: > Am 16.06.2011 16:28, schrieb Christoph Hellwig: >> On Wed, Jun 15, 2011 at 09:46:10AM -0400, Federico Simoncelli wrote: >>> qemu-img currently writes disk images using writeback and filling >>> up the cache buffers which are then flushed by the kernel preventing >>> other processes from accessing the storage. >>> This is particularly bad in cluster environments where time-based >>> algorithms might be in place and accessing the storage within >>> certain timeouts is critical. >>> This patch adds the option to choose a cache method when writing >>> disk images. >> >> Allowing to chose the mode is of course fine, but what about also >> choosing a good default? writethrough doesn't really make any sense >> for qemu-img, given that we can trivially flush the cache at the end >> of the operations. I'd also say that using the buffer cache doesn't >> make sense either, as there is little point in caching these operations. > > Right, we need to keep the defaults as they are. That is, for convert > unsafe and for everything else writeback. The patch seems to make > writeback the default for everything. Federico, are you going to fix this in a v4? Kevin