On 09/13/2013 04:24 AM, Peter Lieven wrote:
> Signed-off-by: Peter Lieven <p...@kamp.de>
> ---
>  block-migration.c         |    2 +-
>  block.c                   |   20 +++++++++++---------
>  block/backup.c            |    3 ++-
>  block/qcow2.c             |    2 +-
>  block/qed.c               |    3 ++-
>  block/raw_bsd.c           |    5 +++--
>  block/vmdk.c              |    3 ++-
>  include/block/block.h     |    4 ++--
>  include/block/block_int.h |    2 +-
>  qemu-io-cmds.c            |    2 +-
>  10 files changed, 26 insertions(+), 20 deletions(-)

Reviewed-by: Eric Blake <ebl...@redhat.com>

>  
> -int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num, int 
> nb_sectors)
> +int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num,
> +                      int nb_sectors, BdrvRequestFlags flags)

Technically, you are allowing any bitwise combination of
BdrvRequestFlags, including combinations that are NOT enumerated values
within BdrvRequestFlags.  There are some type-strict languages where
you'd fail to compile when passing in a non-enum value.  But C allows
this (ab)use of enum types in place of an integer type, and I find it
better documented this way, so I'm fine with leaving it as-is.  That,
and you're just copying existing style already in qemu :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to