From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeS8e-0003O0-Dv for qemu-devel@nongnu.org; Fri, 21 Aug 2009 07:18:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeS8Z-0003NQ-Rp for qemu-devel@nongnu.org; Fri, 21 Aug 2009 07:18:31 -0400 Received: from [199.232.76.173] (port=47062 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeS8Z-0003NN-Os for qemu-devel@nongnu.org; Fri, 21 Aug 2009 07:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58234) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MeS8Z-00058x-92 for qemu-devel@nongnu.org; Fri, 21 Aug 2009 07:18:27 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7LBIPkU025298 for ; Fri, 21 Aug 2009 07:18:25 -0400 Received: from dhcp-5-188.str.redhat.com (vpn-10-88.str.redhat.com [10.32.10.88]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7LBI6O2003435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 21 Aug 2009 07:18:24 -0400 Message-ID: <4A8E822D.5030904@redhat.com> Date: Fri, 21 Aug 2009 13:17:01 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2] qcow2: Metadata preallocation References: <1250517010-11352-1-git-send-email-kwolf@redhat.com> In-Reply-To: <1250517010-11352-1-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Kevin Wolf schrieb: > This introduces a qemu-img create option for qcow2 which allows the metadata to > be preallocated, i.e. clusters are reserved in the refcount table and L1/L2 > tables, but no data is written to them. Metadata is quite small, so this > happens in almost no time. > > Especially with qcow2 on virtio this helps to gain a bit of performance during > the initial writes. However, as soon as create a snapshot, we're back to the > normal slow speed, obviously. So this isn't the real fix, but kind of a cheat > while we're still having trouble with qcow2 on virtio. > > Note that the option is disabled by default and needs to be specified > explicitly using qemu-img create -f qcow2 -o preallocation=metadata. > > Signed-off-by: Kevin Wolf > --- > > v2: Use bdrv_truncate() to set the right file size This one seems to be wrong actually, possibly some metadata being stored after the last allocated cluster. Please apply version 1 instead. Kevin