From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXDYS-00033g-Li for qemu-devel@nongnu.org; Thu, 16 Jun 2011 10:28:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXDYJ-00030D-Ug for qemu-devel@nongnu.org; Thu, 16 Jun 2011 10:28:19 -0400 Received: from verein.lst.de ([213.95.11.211]:58686 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXDYJ-0002zq-CX for qemu-devel@nongnu.org; Thu, 16 Jun 2011 10:28:11 -0400 Date: Thu, 16 Jun 2011 16:28:09 +0200 From: Christoph Hellwig Message-ID: <20110616142809.GA9468@lst.de> References: <4DF8A4FD.6050807@redhat.com> <1308145570-18364-1-git-send-email-fsimonce@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1308145570-18364-1-git-send-email-fsimonce@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-img: Add cache command line option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Federico Simoncelli Cc: kwolf@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com 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.