qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/10] block/json: Add functions for cache contr


From: Benoît Canet
Subject: Re: [Qemu-devel] [PATCH 03/10] block/json: Add functions for cache control
Date: Wed, 5 Mar 2014 17:07:00 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

The Monday 03 Mar 2014 à 16:28:46 (+0100), Max Reitz wrote :
> Add passthrough functions for bdrv_aio_flush() and
> bdrv_invalidate_cache().
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  block/json.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/block/json.c b/block/json.c
> index 6d63cf6..2f885cc 100644
> --- a/block/json.c
> +++ b/block/json.c
> @@ -91,6 +91,18 @@ static BlockDriverAIOCB *json_aio_writev(BlockDriverState 
> *bs,
>      return bdrv_aio_writev(bs->file, sector_num, qiov, nb_sectors, cb, 
> opaque);
>  }
>  
> +static BlockDriverAIOCB *json_aio_flush(BlockDriverState *bs,
> +                                        BlockDriverCompletionFunc *cb,
> +                                        void *opaque)
> +{
> +    return bdrv_aio_flush(bs->file, cb, opaque);
> +}
> +
> +static void json_invalidate_cache(BlockDriverState *bs)
> +{
> +    return bdrv_invalidate_cache(bs->file);
> +}
> +
>  static int64_t json_getlength(BlockDriverState *bs)
>  {
>      return bdrv_getlength(bs->file);
> @@ -118,6 +130,9 @@ static BlockDriver bdrv_json = {
>  
>      .bdrv_aio_readv             = json_aio_readv,
>      .bdrv_aio_writev            = json_aio_writev,
> +    .bdrv_aio_flush             = json_aio_flush,
> +
> +    .bdrv_invalidate_cache      = json_invalidate_cache,
>  
>      .has_variable_length        = true,
>      .bdrv_getlength             = json_getlength,
> -- 
> 1.9.0
> 
> 
Reviewed-by: Benoit Canet <address@hidden>



reply via email to

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