[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 05/12] block/json: Add functions for cache co
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [PATCH v3 05/12] block/json: Add functions for cache control |
Date: |
Thu, 10 Apr 2014 20:57:50 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
The Thursday 10 Apr 2014 à 20:43:36 (+0200), 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 591bc47..0e2d518 100644
> --- a/block/json.c
> +++ b/block/json.c
> @@ -88,6 +88,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, Error **errp)
> +{
> + return bdrv_invalidate_cache(bs->file, errp);
> +}
> +
> static int64_t json_getlength(BlockDriverState *bs)
> {
> return bdrv_getlength(bs->file);
> @@ -115,6 +127,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.1
>
Reviewed-by: Benoit Canet <address@hidden>
- [Qemu-devel] [PATCH v3 00/12] block/json: Add JSON protocol driver, Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 01/12] qdict: Add qdict_join(), Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 02/12] check-qdict: Add test for qdict_join(), Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 03/12] block: Add "has_single_child" field for drivers, Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 04/12] block/json: Add JSON protocol driver, Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 05/12] block/json: Add functions for cache control, Max Reitz, 2014/04/10
- Re: [Qemu-devel] [PATCH v3 05/12] block/json: Add functions for cache control,
Benoît Canet <=
- [Qemu-devel] [PATCH v3 06/12] block/json: Add functions for writing zeroes etc., Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 08/12] block/json: Add ioctl etc., Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 07/12] block/json: Add bdrv_co_get_block_status(), Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 09/12] block/json: Add bdrv_get_specific_info(), Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 10/12] block/raw_bsd: Add bdrv_get_specific_info(), Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 11/12] block/qapi: Ignore filters on top for format name, Max Reitz, 2014/04/10
- [Qemu-devel] [PATCH v3 12/12] iotests: Add test for the JSON protocol, Max Reitz, 2014/04/10