On 02/18/2013 07:09 AM, Wenchao Xia wrote:
>   This patch add function bdrv_query_image_info(), which will return
> image info in qmp object format. The implementation code are based
> on the code moved from qemu-img.c, but use block layer function to get
> snapshot info.
>   A check with bdrv_can_read_snapshot(), was done before collecting
> snapshot info.
> 
> Signed-off-by: Wenchao Xia <xiaw...@linux.vnet.ibm.com>
> Reviewed-by: Eric Blake <ebl...@redhat.com>

Again, your cover letter says you heavily touched this patch; leaving my
Reviewed-by intact is misleading.

> +++ b/block.c
> @@ -2649,6 +2649,11 @@ void bdrv_iterate(void (*it)(void *opaque, 
> BlockDriverState *bs), void *opaque)
>      }
>  }
>  
> +static const char *bdrv_get_filename(const BlockDriverState *bs)
> +{
> +    return bs->filename;
> +}

This function is now a waste.  Since it is static to this file only, and
the only thing it is doing is accessing a field inside bs, all
call-sites have access to the same field directly, without having to go
through this wrapper.

-- 
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