qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 12/13] vmdk: Convert to bdrv_co_pwrite_zeroes()


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 12/13] vmdk: Convert to bdrv_co_pwrite_zeroes()
Date: Wed, 25 May 2016 16:23:27 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
> 
> Signed-off-by: Eric Blake <address@hidden>
> ---
>  block/vmdk.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/block/vmdk.c b/block/vmdk.c
> index 8494d63..284d7a0 100644
> --- a/block/vmdk.c
> +++ b/block/vmdk.c
> @@ -1704,15 +1704,14 @@ static int vmdk_write_compressed(BlockDriverState *bs,
>      }
>  }
> 
> -static int coroutine_fn vmdk_co_write_zeroes(BlockDriverState *bs,
> -                                             int64_t sector_num,
> -                                             int nb_sectors,
> -                                             BdrvRequestFlags flags)
> +static int coroutine_fn vmdk_co_pwrite_zeroes(BlockDriverState *bs,
> +                                              int64_t offset,
> +                                              int count,
> +                                              BdrvRequestFlags flags)
>  {
>      int ret;
>      BDRVVmdkState *s = bs->opaque;
> -    uint64_t offset = sector_num * BDRV_SECTOR_SIZE;
> -    uint64_t bytes = nb_sectors * BDRV_SECTOR_SIZE;
> +    uint64_t bytes = count;

That's an unnecessary variable again. Whether you decide to change it or
not:

Reviewed-by: Kevin Wolf <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]