From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKr9k-0005YP-He for qemu-devel@nongnu.org; Fri, 22 Aug 2014 11:53:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKr9e-0008Rr-DX for qemu-devel@nongnu.org; Fri, 22 Aug 2014 11:53:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKr9e-0008Rl-7I for qemu-devel@nongnu.org; Fri, 22 Aug 2014 11:53:30 -0400 Date: Fri, 22 Aug 2014 17:53:22 +0200 From: Kevin Wolf Message-ID: <20140822155322.GQ32377@noname.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> <20140822153440.GK1302@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140822153440.GK1302@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: "Richard W.M. Jones" Cc: Hu Tao , qemu-devel@nongnu.org, Max Reitz , Stefan Hajnoczi , Yasunori Goto Am 22.08.2014 um 17:34 hat Richard W.M. Jones geschrieben: > 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. Isn't the first one exactly preallocation=falloc and the second is preallocation=full, except that we're not writing non-zero blocks? (And probably shouldn't, because that would change the content.) Kevin