From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKpqD-0005m6-AB for qemu-devel@nongnu.org; Fri, 22 Aug 2014 10:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKpq9-00071z-9H for qemu-devel@nongnu.org; Fri, 22 Aug 2014 10:29:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKpq9-00071q-0l for qemu-devel@nongnu.org; Fri, 22 Aug 2014 10:29:17 -0400 Date: Fri, 22 Aug 2014 15:20:16 +0100 From: "Daniel P. Berrange" Message-ID: <20140822142016.GN8447@redhat.com> References: <20140728084846.GH31917@G08FNSTD100614.fnst.cn.fujitsu.com> <20140822122556.GJ14001@redhat.com> <20140822131331.GN32377@noname.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20140822131331.GN32377@noname.redhat.com> Subject: Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Hu Tao , qemu-devel@nongnu.org, "Richard W.M. Jones" , Stefan Hajnoczi , Yasunori Goto , Max Reitz On Fri, Aug 22, 2014 at 03:13:31PM +0200, Kevin Wolf wrote: > Am 22.08.2014 um 14:25 hat Richard W.M. Jones geschrieben: > > > > On Mon, Jul 28, 2014 at 04:48:46PM +0800, Hu Tao wrote: > > > ping... > > > > > > All the 6 patches have reviewed-by now. > > > > > > On Fri, Jul 11, 2014 at 02:09:57PM +0800, Hu Tao wrote: > > > > This series adds two preallocation mode to qcow2 and raw: > > > > > > > > Option preallocation=full preallocates disk space for image by writing > > > > zeros to disk, this ensures disk space in any cases. > > > > > > > > Option preallocation=falloc preallocates disk space by calling > > > > posix_fallocate(). This is faster than preallocation=full. > > > > Sorry if this was discussed before, but why would anyone use > > preallocation=full if preallocation=falloc was possible? > > > > Shouldn't preallocation=full simply use posix_fallocate if it's > > available, and fall back to writing zeroes if not? > > posix_fallocate() is basically metadata preallocation on the file > system level. If any lower levels involve allocations as well, does > posix_fallocate() allocate them there? Well the man page says "After a successful call to posix_fallocate(), subsequent writes to bytes in the specified range are guaranteed not to fail because of lack of disk space." Which seems like it is what users would want when they ask for preallocate=full. So I'm not seeing the benefit of instead being able to ask to write zeros would bring. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|