summaryrefslogtreecommitdiffstats
path: root/block/parallels.c
diff options
context:
space:
mode:
authorEric Blake2016-05-06 18:26:29 +0200
committerKevin Wolf2016-05-12 15:22:08 +0200
commit983a1600504b1b78242b9da29b0d7018a6eb231d (patch)
treeeeac41d09075981786e1c56daad00f0fcad94752 /block/parallels.c
parentblock: Switch blk_read_unthrottled() to byte interface (diff)
downloadqemu-983a1600504b1b78242b9da29b0d7018a6eb231d.tar.gz
qemu-983a1600504b1b78242b9da29b0d7018a6eb231d.tar.xz
qemu-983a1600504b1b78242b9da29b0d7018a6eb231d.zip
block: Switch blk_*write_zeroes() to byte interface
Sector-based blk_write() should die; convert the one-off variant blk_write_zeroes() to use an offset/count interface instead. Likewise for blk_co_write_zeroes() and blk_aio_write_zeroes(). Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/parallels.c')
-rw-r--r--block/parallels.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/parallels.c b/block/parallels.c
index 2d8bc87e47..cddbfc4012 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -516,7 +516,8 @@ static int parallels_create(const char *filename, QemuOpts *opts, Error **errp)
if (ret < 0) {
goto exit;
}
- ret = blk_write_zeroes(file, 1, bat_sectors - 1, 0);
+ ret = blk_write_zeroes(file, BDRV_SECTOR_SIZE,
+ (bat_sectors - 1) << BDRV_SECTOR_BITS, 0);
if (ret < 0) {
goto exit;
}