qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V6 06/14] block: add image info query function b


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V6 06/14] block: add image info query function bdrv_query_image_info()
Date: Tue, 19 Feb 2013 16:04:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

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 <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>

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

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