[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH V6 00/14] add qmp/hmp interfaces for internal snapshot info, Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 01/14] qemu-img: remove unused parameter in collect_image_info(), Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 02/14] block: add bdrv_can_read_snapshot() function, Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 03/14] block: return bool for bdrv_can_snapshot(), Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 07/14] block: rename bdrv_query_info() to bdrv_query_block_info(), Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 06/14] block: add image info query function bdrv_query_image_info(), Wenchao Xia, 2013/02/18
- Re: [Qemu-devel] [PATCH V6 06/14] block: add image info query function bdrv_query_image_info(),
Eric Blake <=
- [Qemu-devel] [PATCH V6 04/14] block: move collect_snapshots() and collect_image_info() to block.c, Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 12/14] hmp: add function hmp_info_snapshots(), Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 09/14] block: move bdrv_snapshot_find() to block.c, Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 08/14] qmp: add interface query-images., Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 14/14] hmp: show snapshots on single block device, Wenchao Xia, 2013/02/18