From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPWmt-0005FG-Q8 for qemu-devel@nongnu.org; Thu, 04 Sep 2014 09:09:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPWmp-0008F8-69 for qemu-devel@nongnu.org; Thu, 04 Sep 2014 09:09:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPWmo-0008F3-UY for qemu-devel@nongnu.org; Thu, 04 Sep 2014 09:09:15 -0400 Date: Thu, 4 Sep 2014 15:09:08 +0200 From: Kevin Wolf Message-ID: <20140904130908.GJ3897@noname.str.redhat.com> References: <4b14d32b73bf4c0e234771e802a819df4a9e1bb1.1409299732.git.hutao@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b14d32b73bf4c0e234771e802a819df4a9e1bb1.1409299732.git.hutao@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: Fam Zheng , "Richard W.M. Jones" , qemu-devel@nongnu.org, Max Reitz , Stefan Hajnoczi , Yasunori Goto Am 29.08.2014 um 10:33 hat Hu Tao geschrieben: > preallocation=full allocates disk space by fallocating the space if > posix_fallocate() is available, otherwise by writing zeros to disk to > ensure disk space in any cases. > > Signed-off-by: Hu Tao > --- > block/qcow2.c | 61 +++++++++++++++++++++++++++++++++++++++------- > qemu-doc.texi | 7 +++--- > qemu-img.texi | 7 +++--- > tests/qemu-iotests/082.out | 54 ++++++++++++++++++++-------------------- > 4 files changed, 87 insertions(+), 42 deletions(-) > + qemu_opt_set_number(opts, BLOCK_OPT_SIZE, > + aligned_total_size + meta_size); > + qemu_opt_set(opts, BLOCK_OPT_PREALLOC, PreallocMode_lookup[prealloc]); > + } This means that if used with a protocol that doesn't have a preallocation option, it gets silently ignored. I'm not completely decided yet whether that's a bug or a feature. :-) Kevin