Re: [Qemu-devel] [PATCH v6 3/8] mirror: Do zero write on target if sectors not allocated

2015-05-28 Thread Paolo Bonzini
On 28/05/2015 07:29, Fam Zheng wrote: > 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 Reviewed-by: Paol

[Qemu-devel] [PATCH v6 3/8] mirror: Do zero write on target if sectors not allocated

2015-05-27 Thread Fam Zheng
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 --- block/mirror.c | 20 ++-- 1 file changed, 18