aboutsummaryrefslogtreecommitdiff
path: root/block-migration.c
diff options
context:
space:
mode:
authorPeter Lieven <pl@kamp.de>2013-10-24 12:06:52 +0200
committerKevin Wolf <kwolf@redhat.com>2013-11-28 10:30:51 +0100
commitd32f35cbc5a87af5e1100dd55074a79fc2cb5307 (patch)
tree55fa60fcbf692789af57904cb5bc84be7b649df7 /block-migration.c
parentaa7bfbfff792538a9eeefe879fc4c629aa0b4203 (diff)
block: introduce BDRV_REQ_MAY_UNMAP request flag
Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block-migration.c')
-rw-r--r--block-migration.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block-migration.c b/block-migration.c
index 713a8e36e1..fc4ef93ea2 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -780,7 +780,8 @@ static int block_load(QEMUFile *f, void *opaque, int version_id)
}
if (flags & BLK_MIG_FLAG_ZERO_BLOCK) {
- ret = bdrv_write_zeroes(bs, addr, nr_sectors, 0);
+ ret = bdrv_write_zeroes(bs, addr, nr_sectors,
+ BDRV_REQ_MAY_UNMAP);
} else {
buf = g_malloc(BLOCK_SIZE);
qemu_get_buffer(f, buf, BLOCK_SIZE);