From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwq6L-0003JD-7N for qemu-devel@nongnu.org; Fri, 05 Dec 2014 05:27:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xwq6E-0000na-Pu for qemu-devel@nongnu.org; Fri, 05 Dec 2014 05:27:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwq6E-0000nS-IP for qemu-devel@nongnu.org; Fri, 05 Dec 2014 05:26:58 -0500 From: Kevin Wolf Date: Fri, 5 Dec 2014 11:26:49 +0100 Message-Id: <1417775209-11812-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, amulya.lokesha@emc.com, jcody@redhat.com, stefanha@redhat.com, mreitz@redhat.com Like for most other image formats, vhdx images read as all zero in qemu after their creation (we're taking advantage from the fact that qemu has just created the image, because PAYLOAD_BLOCK_NOT_PRESENT actually means undefined rather than zeroed according to the spec). This fixes that 'qemu-img convert' to vhdx fully populates the image. Signed-off-by: Kevin Wolf --- block/vhdx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vhdx.c b/block/vhdx.c index 12bfe75..8a54da0 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1951,6 +1951,7 @@ static BlockDriver bdrv_vhdx = { .bdrv_co_readv = vhdx_co_readv, .bdrv_co_writev = vhdx_co_writev, .bdrv_create = vhdx_create, + .bdrv_has_zero_init = bdrv_has_zero_init_1, .bdrv_get_info = vhdx_get_info, .bdrv_check = vhdx_check, -- 1.8.3.1