qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 08/13] gluster: Convert to bdrv_co_pwrite_zeroes


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH 08/13] gluster: Convert to bdrv_co_pwrite_zeroes()
Date: Wed, 25 May 2016 15:57:22 +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/gluster.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/block/gluster.c b/block/gluster.c
> index a8aaacf..15aff4b 100644
> --- a/block/gluster.c
> +++ b/block/gluster.c
> @@ -454,14 +454,13 @@ static void qemu_gluster_reopen_abort(BDRVReopenState 
> *state)
>  }
> 
>  #ifdef CONFIG_GLUSTERFS_ZEROFILL
> -static coroutine_fn int qemu_gluster_co_write_zeroes(BlockDriverState *bs,
> -        int64_t sector_num, int nb_sectors, BdrvRequestFlags flags)
> +static coroutine_fn int qemu_gluster_co_pwrite_zeroes(BlockDriverState *bs,
> +        int64_t offset, int count, BdrvRequestFlags flags)
>  {
>      int ret;
>      GlusterAIOCB acb;
>      BDRVGlusterState *s = bs->opaque;
> -    off_t size = nb_sectors * BDRV_SECTOR_SIZE;
> -    off_t offset = sector_num * BDRV_SECTOR_SIZE;
> +    off_t size = count;

This variable isn't really necessary. Up to you whether you want to
change it.

Reviewed-by: Kevin Wolf <address@hidden>



reply via email to

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