aboutsummaryrefslogtreecommitdiff
path: root/qemu-io-cmds.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 /qemu-io-cmds.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 'qemu-io-cmds.c')
-rw-r--r--qemu-io-cmds.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index ee0c5d7a55..3040a4b12e 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -494,8 +494,7 @@ static void coroutine_fn co_write_zeroes_entry(void *opaque)
{
CoWriteZeroes *data = opaque;
- data->ret = blk_co_write_zeroes(data->blk, data->offset / BDRV_SECTOR_SIZE,
- data->count / BDRV_SECTOR_SIZE, 0);
+ data->ret = blk_co_write_zeroes(data->blk, data->offset, data->count, 0);
data->done = true;
if (data->ret < 0) {
*data->total = data->ret;
@@ -1704,8 +1703,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
}
ctx->qiov.size = count;
- blk_aio_write_zeroes(blk, ctx->offset >> 9, count >> 9, 0,
- aio_write_done, ctx);
+ blk_aio_write_zeroes(blk, ctx->offset, count, 0, aio_write_done, ctx);
} else {
nr_iov = argc - optind;
ctx->buf = create_iovec(blk, &ctx->qiov, &argv[optind], nr_iov,