qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 07/12] block/json: Add bdrv_co_get_block_stat


From: Benoît Canet
Subject: Re: [Qemu-devel] [PATCH v3 07/12] block/json: Add bdrv_co_get_block_status()
Date: Thu, 10 Apr 2014 20:58:19 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

The Thursday 10 Apr 2014 à 20:43:38 (+0200), Max Reitz wrote :
> Implement this function by passing it through to bs->file.
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  block/json.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/block/json.c b/block/json.c
> index cb83780..dfeec81 100644
> --- a/block/json.c
> +++ b/block/json.c
> @@ -110,6 +110,13 @@ static coroutine_fn int 
> json_co_write_zeroes(BlockDriverState *bs,
>      return bdrv_co_write_zeroes(bs->file, sector_num, nb_sectors, flags);
>  }
>  
> +static coroutine_fn int64_t json_co_get_block_status(BlockDriverState *bs,
> +                                                     int64_t sector_num,
> +                                                     int nb_sectors, int 
> *pnum)
> +{
> +    return bdrv_get_block_status(bs->file, sector_num, nb_sectors, pnum);
> +}
> +
>  static void json_invalidate_cache(BlockDriverState *bs, Error **errp)
>  {
>      return bdrv_invalidate_cache(bs->file, errp);
> @@ -156,6 +163,7 @@ static BlockDriver bdrv_json = {
>      .bdrv_aio_discard           = json_aio_discard,
>  
>      .bdrv_co_write_zeroes       = json_co_write_zeroes,
> +    .bdrv_co_get_block_status   = json_co_get_block_status,
>  
>      .bdrv_invalidate_cache      = json_invalidate_cache,
>  
> -- 
> 1.9.1
> 
Reviewed-by: Benoit Canet <address@hidden>

Here you go :)



reply via email to

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