block: Use bdrv_has_zero_init_truncate()
commitb647d69adc394312dedb56f6b3ce19b9c316931f
authorMax Reitz <mreitz@redhat.com>
Wed, 24 Jul 2019 17:12:33 +0000 (24 19:12 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 19 Aug 2019 15:13:26 +0000 (19 17:13 +0200)
treee5ee4fcdee9d037b303b5e74dba6363aed7da484
parent1dcaf52760ccaa2e019164c887b8436ac6c5d8ea
block: Use bdrv_has_zero_init_truncate()

vhdx and parallels call bdrv_has_zero_init() when they do not really
care about an image's post-create state but only about what happens when
you grow an image.  That is a bit ugly, and also overly safe when
growing preallocated images without preallocating the new areas.

Let them use bdrv_has_zero_init_truncate() instead.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20190724171239.8764-6-mreitz@redhat.com
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
[mreitz: Added commit message]
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/parallels.c
block/vhdx.c