diff options
author | Lidong Chen <lidongchen@tencent.com> | 2017-04-13 10:34:28 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-04-21 10:36:12 +0100 |
commit | 3928d50bf151d2f25fde93432b0ee1d8eddd982d (patch) | |
tree | e0cd11b557ef32e5edc082429cd1d8db91308fba /accel.c | |
parent | d72915c60bff51495529449750e051d01b03c62f (diff) |
migration/block: use blk_pwrite_zeroes for each zero cluster
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.
[Initialize cluster_size to BLOCK_SIZE to prevent a gcc uninitialized
variable compiler warning. In reality we always initialize cluster_size
in a conditional but gcc doesn't know that.
--Stefan]
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Lidong Chen <lidongchen@tencent.com>
Message-id: 1492050868-16200-1-git-send-email-lidongchen@tencent.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'accel.c')
0 files changed, 0 insertions, 0 deletions