qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed
commitdb933fbe0646fb75f93bbb8eb7d4d9db31c4d345
authorLidong Chen <lidongchen@tencent.com>
Thu, 27 Apr 2017 02:58:27 +0000 (27 10:58 +0800)
committerMax Reitz <mreitz@redhat.com>
Fri, 28 Apr 2017 16:18:23 +0000 (28 18:18 +0200)
treecdb444959877cc45166f17c6174835103afa1653
parent9f1b92add20d244677c916e77d840b6282f691ac
qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

When the buffer is zero, blk_co_pwrite_zeroes is more effective than
blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. This patch can reduce
the time for converting qcow2 images with lots of zero data.

Signed-off-by: Lidong Chen <lidongchen@tencent.com>
Message-id: 1493261907-18734-1-git-send-email-lidongchen@tencent.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
qemu-img.c