parallels: Rework truncation logic
commitbda4cdcbb997d34762e2af27e1f475357a9b4453
authorEric Blake <eblake@redhat.com>
Tue, 28 Apr 2020 20:29:03 +0000 (28 15:29 -0500)
committerKevin Wolf <kwolf@redhat.com>
Fri, 8 May 2020 11:26:35 +0000 (8 13:26 +0200)
treeb594654388c54a5d67dd58686702cbd5e8be6246
parentbe9c9404db7e6992946fa55c75ca61dfb20926eb
parallels: Rework truncation logic

The parallels driver tries to use truncation for image growth, but can
only do so when reads are guaranteed as zero.  Now that we have a way
to request zero contents from truncation, we can defer the decision to
actual allocation attempts rather than up front, reducing the number
of places that still use bdrv_has_zero_init_truncate.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200428202905.770727-8-eblake@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/parallels.c