On Thu, Apr 13, 2017 at 10:16 PM, Stefan Hajnoczi <stefa...@redhat.com> wrote: > On Thu, Apr 13, 2017 at 10:34:28AM +0800, jemmy858...@gmail.com wrote: >> From: Lidong Chen <lidongc...@tencent.com> >> >> BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, >> this may cause the qcow2 file size to be bigger after migration. >> This patch checks each cluster, using blk_pwrite_zeroes for each >> zero cluster. >> >> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> >> Signed-off-by: Lidong Chen <lidongc...@tencent.com> >> --- >> v6 changelog: >> Fix up some grammar in the comment. >> --- >> migration/block.c | 35 +++++++++++++++++++++++++++++++++-- >> 1 file changed, 33 insertions(+), 2 deletions(-) > > I fixed the following gcc warning when merging the patch: > > migration/block.c:958:25: error: ‘cluster_size’ may be used uninitialized > in this function [-Werror=maybe-uninitialized] > buffer_is_zero(cur_buf, cluster_size)) {
Thanks,i will check gcc warning next time. > > Thanks, applied to my block-next tree: > https://github.com/stefanha/qemu/commits/block-next > > Stefan