From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKqre-00056t-A9 for qemu-devel@nongnu.org; Fri, 22 Aug 2014 11:34:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKqrV-0002oj-Re for qemu-devel@nongnu.org; Fri, 22 Aug 2014 11:34:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKqrV-0002oZ-Js for qemu-devel@nongnu.org; Fri, 22 Aug 2014 11:34:45 -0400 Date: Fri, 22 Aug 2014 16:34:40 +0100 From: "Richard W.M. Jones" Message-ID: <20140822153440.GK1302@redhat.com> References: <20140728084846.GH31917@G08FNSTD100614.fnst.cn.fujitsu.com> <20140822122556.GJ14001@redhat.com> <20140822131331.GN32377@noname.redhat.com> <20140822142016.GN8447@redhat.com> <20140822152233.GP32377@noname.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140822152233.GP32377@noname.redhat.com> Subject: Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Hu Tao , qemu-devel@nongnu.org, Max Reitz , Stefan Hajnoczi , Yasunori Goto On Fri, Aug 22, 2014 at 05:22:33PM +0200, Kevin Wolf wrote: > It's still useful because it happens to reduce the overhead in most > implementations and it's a relatively quick operation, but the best way > I know of to actually _fully_ preallocate is still writing zeros. Which > of the two the user wants, is a decision that qemu can't make for them. This is a difficult situation. Possibly the choice is between - efficiently make the file fully allocated, that works in the vast majority of cases, but don't go crazy (ie. fallocate) - really really try as hard as possible to make sure that future allocations will never fail (ie. write random non-zero data to the file) Note that neither of these is the preallocation=... option as specified in this patch. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/