summaryrefslogtreecommitdiffstats
path: root/migration
diff options
context:
space:
mode:
authorEric Blake2016-06-01 23:10:04 +0200
committerKevin Wolf2016-06-08 10:21:08 +0200
commit74021bc497c8e8a1b03d633656aa5ff7112bd721 (patch)
treecacba254786bf1652554e9d425c5c1951f9b0a57 /migration
parentblock: Add .bdrv_co_pwrite_zeroes() (diff)
downloadqemu-74021bc497c8e8a1b03d633656aa5ff7112bd721.tar.gz
qemu-74021bc497c8e8a1b03d633656aa5ff7112bd721.tar.xz
qemu-74021bc497c8e8a1b03d633656aa5ff7112bd721.zip
block: Switch bdrv_write_zeroes() to byte interface
Rename to bdrv_pwrite_zeroes() to let the compiler ensure we cater to the updated semantics. Do the same for bdrv_co_write_zeroes(). Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/block.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/migration/block.c b/migration/block.c
index e0628d187f..16cc1f8609 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -883,8 +883,9 @@ 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,
- BDRV_REQ_MAY_UNMAP);
+ ret = bdrv_pwrite_zeroes(bs, addr << BDRV_SECTOR_BITS,
+ nr_sectors << BDRV_SECTOR_BITS,
+ BDRV_REQ_MAY_UNMAP);
} else {
buf = g_malloc(BLOCK_SIZE);
qemu_get_buffer(f, buf, BLOCK_SIZE);