aboutsummaryrefslogtreecommitdiff
path: root/block/parallels.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-05-06 10:26:29 -0600
committerKevin Wolf <kwolf@redhat.com>2016-05-12 15:22:08 +0200
commit983a1600504b1b78242b9da29b0d7018a6eb231d (patch)
treeeeac41d09075981786e1c56daad00f0fcad94752 /block/parallels.c
parentb7d17f9fa4df83ed060168c450889d73c441c8f6 (diff)
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;
}