]> git.ipfire.org Git - thirdparty/qemu.git/commit
mirror: Do zero write on target if sectors not allocated
authorFam Zheng <famz@redhat.com>
Mon, 8 Jun 2015 05:56:09 +0000 (13:56 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 30 Jul 2015 02:46:07 +0000 (21:46 -0500)
commit27ed14c4d7decd359edb7fec0c8a39971ef32a72
treea9d5af339c7ddb3f048dbc6de54d757b72412025
parent6a45a1b8e45bf3396dd4901a5f7cbadc3780f250
mirror: Do zero write on target if sectors not allocated

If guest discards a source cluster, mirroring with bdrv_aio_readv is overkill.
Some protocols do zero upon discard, where it's best to use
bdrv_aio_write_zeroes, otherwise, bdrv_aio_discard will be enough.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit dcfb3beb5130694b76b57de109619fcbf9c7e5b5)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/mirror.c