qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 01/10] block/io: add bdrv_co_write_compressed


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 01/10] block/io: add bdrv_co_write_compressed
Date: Thu, 19 May 2016 14:25:54 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

On Sat, May 14, 2016 at 03:45:49PM +0300, Denis V. Lunev wrote:
> diff --git a/block/io.c b/block/io.c
> index cd6d71a..88af10c 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -1828,8 +1828,8 @@ int bdrv_is_allocated_above(BlockDriverState *top,
>      return 0;
>  }
>  
> -int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
> -                          const uint8_t *buf, int nb_sectors)
> +int bdrv_co_write_compressed(BlockDriverState *bs, int64_t sector_num,
> +                             int nb_sectors, QEMUIOVector *qiov)

Please use the coroutine_fn attribute to declare that this function must
be called in coroutine context.

> diff --git a/include/block/block_int.h b/include/block/block_int.h
> index a029c20..3c93ddb 100644
> --- a/include/block/block_int.h
> +++ b/include/block/block_int.h
> @@ -208,6 +208,9 @@ struct BlockDriver {
>      int (*bdrv_write_compressed)(BlockDriverState *bs, int64_t sector_num,
>                                   const uint8_t *buf, int nb_sectors);
>  
> +    int (*bdrv_co_write_compressed)(BlockDriverState *bs, int64_t sector_num,
> +                                    int nb_sectors, QEMUIOVector *qiov);

Please add the coroutine_fn attribute just like .bdrv_co_readv() and
friends.

Attachment: signature.asc
Description: PGP signature


reply via email to

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