aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-04-24 16:27:01 +0200
committerKevin Wolf <kwolf@redhat.com>2020-04-30 17:51:07 +0200
commiteb8a0cf3ba26611f3981f8f45ac6a868975a68cc (patch)
tree4b8711b089ae88ba8166f9881f83ac3ffb1092b5 /hw
parentbf03dede475e29a16f9188ea85a4d77cd3dcf2b7 (diff)
downloadqemu-eb8a0cf3ba26611f3981f8f45ac6a868975a68cc.zip
qemu-eb8a0cf3ba26611f3981f8f45ac6a868975a68cc.tar.gz
qemu-eb8a0cf3ba26611f3981f8f45ac6a868975a68cc.tar.bz2
qcow2: Forward ZERO_WRITE flag for full preallocation
The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the image is possibly preallocated and then the zero flag is added to all clusters. This means that a copy-on-write operation may be needed when writing to these clusters, despite having used preallocation, negating one of the major benefits of preallocation. Instead, try to forward the BDRV_REQ_ZERO_WRITE to the protocol driver, and if the protocol driver can ensure that the new area reads as zeros, we can skip setting the zero flag in the qcow2 layer. Unfortunately, the same approach doesn't work for metadata preallocation, so we'll still set the zero flag there. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200424142701.67053-1-kwolf@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
0 files changed, 0 insertions, 0 deletions