[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] quorum: Implement bdrv_get_specific_info
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH] quorum: Implement bdrv_get_specific_info |
Date: |
Thu, 24 Mar 2016 13:52:59 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Thu 24 Mar 2016 04:17:12 AM CET, Wen Congyang wrote:
> The monitor command 'query-block' or 'info block' will output the format
> specific
> information. So we can get each child's child-name after this patch. This
> useful
> for dynamic reconfiguration.
>
> Signed-off-by: Wen Congyang <address@hidden>
The patch seems correct (but see the comments below), but I'm still
wondering why we need to use child_name for this at all. If I rememeber
correctly the previous discussion we cannot simply use node-name because
a Quorum could have several children with the same name, but I'm still
unsure about how that would happen and what's the use case.
> + ImageInfoSpecific *spec_info = g_new0(ImageInfoSpecific, 1);
> + strList **next;
> +
> + *spec_info = (ImageInfoSpecific){
> + .type = IMAGE_INFO_SPECIFIC_KIND_QUORUM,
> + .u = {
> + .quorum.data = g_new0(ImageInfoSpecificQuorum, 1),
> + },
> + };
I don't think you need to use g_new0() instead of g_new() if you're
immediately doing that assignment afterwards.
> ##
> +# @ImageInfoSpecificQuorum:
> +#
> +# @child-name: List of child name
> +#
> +# Since: 2.7
> +##
> +{ 'struct': 'ImageInfoSpecificQuorum',
> + 'data': {
> + 'child-name': ['str']
> + } }
I think it's better in plural: 'children' or 'children-names'
Berto