From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LqWNM-0003Vn-Kv for qemu-devel@nongnu.org; Sun, 05 Apr 2009 13:43:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LqWNH-0003VI-Ug for qemu-devel@nongnu.org; Sun, 05 Apr 2009 13:43:19 -0400 Received: from [199.232.76.173] (port=39243 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqWNH-0003VE-LW for qemu-devel@nongnu.org; Sun, 05 Apr 2009 13:43:15 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:33251) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LqWNH-0004QZ-9a for qemu-devel@nongnu.org; Sun, 05 Apr 2009 13:43:15 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e37.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n35Hgkck022509 for ; Sun, 5 Apr 2009 11:42:46 -0600 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n35HhEvD186232 for ; Sun, 5 Apr 2009 11:43:14 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n35HhDrB016254 for ; Sun, 5 Apr 2009 11:43:13 -0600 Received: from squirrel.codemonkey.ws (sig-9-65-213-73.mts.ibm.com [9.65.213.73]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n35HhCXo016245 for ; Sun, 5 Apr 2009 11:43:13 -0600 Message-ID: <49D8EDB0.9010504@us.ibm.com> Date: Sun, 05 Apr 2009 12:43:12 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] [UPDATED] Add host_device support to qemu-img. References: <1238634456.15350.595.camel@voxel> In-Reply-To: <1238634456.15350.595.camel@voxel> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Nolan wrote: > This patch allows the use a host_device as the destination for "qemu-img > convert". > > I added a ->bdrv_create function host_device. It merely verifies that > the device exists and is large enough. > > A check is needed in the qemu-img convert loop to ensure that we write > out all 0 sectors to the host_device. Otherwise they end up with stale > garbage where all zero sectors were expected. > > I also made the check against bdrv_is_allocated enabled for everything > _except_ host devices, since there is no point in making the block > backend write a bunch of zeros just so that we can memcmp them > immediately afterwards. Host devices can't benefit from this because > there is no way to differentiate between a sector being unallocated > because it was never written, or because it was written with all zeros > and then made a trip through qemu-img convert. > > Finally, there is an unrelated fix for a typo in the error message > printed if the destination device does not support ->bdrv_create. > > Signed-off-by: Nolan Leake sigbus.net> > Applied. Thanks. Regards, Anthony Liguori