qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init
@ 2014-12-05 10:26 Kevin Wolf
  2014-12-05 11:06 ` Max Reitz
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Kevin Wolf @ 2014-12-05 10:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, amulya.lokesha, jcody, stefanha, mreitz

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 <kwolf@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-10-26 10:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-05 10:26 [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init Kevin Wolf
2014-12-05 11:06 ` Max Reitz
2014-12-05 11:07 ` Kevin Wolf
2014-12-05 14:35   ` Jeff Cody
2014-12-05 11:49 ` Kevin Wolf
2014-12-05 14:34   ` Jeff Cody
2015-10-23 15:32 ` Stefan Hajnoczi
2015-10-23 16:00   ` Kevin Wolf
2015-10-26 10:43     ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).