diff options
author | Eric Blake <eblake@redhat.com> | 2016-06-01 15:10:07 -0600 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-06-08 10:21:08 +0200 |
commit | 9c21a4220b021bb605bf8e51a629ff7e54105c40 (patch) | |
tree | 94293c91a7d33cd8fbf99d9bd9b9ed0cab9f21a9 /block/blkreplay.c | |
parent | 5544b59f8e672bf0a32bef376c59902530f8240f (diff) |
blkreplay: Convert to bdrv_co_pwrite_zeroes()
Another step on our continuing quest to switch to byte-based
interfaces.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/blkreplay.c')
-rwxr-xr-x | block/blkreplay.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/block/blkreplay.c b/block/blkreplay.c index 1a721ad283..525c2d54e0 100755 --- a/block/blkreplay.c +++ b/block/blkreplay.c @@ -103,13 +103,11 @@ static int coroutine_fn blkreplay_co_writev(BlockDriverState *bs, return ret; } -static int coroutine_fn blkreplay_co_write_zeroes(BlockDriverState *bs, - int64_t sector_num, int nb_sectors, BdrvRequestFlags flags) +static int coroutine_fn blkreplay_co_pwrite_zeroes(BlockDriverState *bs, + int64_t offset, int count, BdrvRequestFlags flags) { uint64_t reqid = request_id++; - int ret = bdrv_co_pwrite_zeroes(bs->file->bs, - sector_num << BDRV_SECTOR_BITS, - nb_sectors << BDRV_SECTOR_BITS, flags); + int ret = bdrv_co_pwrite_zeroes(bs->file->bs, offset, count, flags); block_request_create(reqid, bs, qemu_coroutine_self()); qemu_coroutine_yield(); @@ -149,7 +147,7 @@ static BlockDriver bdrv_blkreplay = { .bdrv_co_readv = blkreplay_co_readv, .bdrv_co_writev = blkreplay_co_writev, - .bdrv_co_write_zeroes = blkreplay_co_write_zeroes, + .bdrv_co_pwrite_zeroes = blkreplay_co_pwrite_zeroes, .bdrv_co_discard = blkreplay_co_discard, .bdrv_co_flush = blkreplay_co_flush, }; |