On Thu, Apr 13, 2017 at 10:34:28AM +0800, [email protected] wrote: > From: Lidong Chen <[email protected]> > > 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 <[email protected]> > Signed-off-by: Lidong Chen <[email protected]> > --- > 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, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next
Stefan
signature.asc
Description: PGP signature
