qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/5] block: add bdrv functions for geometry a


From: David Hildenbrand
Subject: Re: [Qemu-devel] [PATCH v4 1/5] block: add bdrv functions for geometry and blocksize
Date: Wed, 17 Dec 2014 16:26:41 +0100

> Add driver functions for geometry and blocksize detection
> 
> Signed-off-by: Ekaterina Tumanova <address@hidden>
> Reviewed-by: Thomas Huth <address@hidden>
> ---
>  block.c                   | 34 ++++++++++++++++++++++++++++++++++
>  include/block/block.h     | 13 +++++++++++++
>  include/block/block_int.h | 15 +++++++++++++++
>  3 files changed, 62 insertions(+)
> 
> diff --git a/block.c b/block.c
> index 4165d42..93409f5 100644
> --- a/block.c
> +++ b/block.c
> @@ -548,6 +548,40 @@ void bdrv_refresh_limits(BlockDriverState *bs, Error 
> **errp)
>      }
>  }
> 
> +/**
> + * Get @bs's logical and physical block size, store them in @bsz.
> + * @bs must not be empty.
> + */
> +void bdrv_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz)
> +{
> +    BlockDriver *drv = bs->drv;
> +
> +    assert(drv != NULL);
> +    if (drv->bdrv_probe_blocksizes &&
> +        !drv->bdrv_probe_blocksizes(bs, bsz)) {

So we want to ignore/drop any error?

> +            return;
> +    }


Looks good to me.

David




reply via email to

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