Am 02.07.25 um 11:13 schrieb Kevin Wolf:
> Am 01.07.2025 um 18:21 hat Fiona Ebner geschrieben:
>> +##
>> +# @BlockdevChild:
>> +#
>> +# @child: The name of the child, for example 'file' or 'backing'.
>> +#
>> +# @node-name: The name of the child's block driver node.
>> +#
>> +# Since: 10.1
>> +##
>> +{ 'struct': 'BlockdevChild',
>> + 'data': { 'child': 'str',
>> + '*node-name': 'str' } }
>
> Is node-name really optional? I don't think we have nodes without a node
> name any more, do we?
I'm not aware of any, but @node-name in @BlockDeviceInfo is marked as
optional too, so I went with that.
Looking at the git history, missing node-names are auto-generated since
15489c769b ("block: auto-generated node-names") or v2.5. The QAPI schema
says @node-name was added before that in v2.0. Should it be made
non-optional in @BlockDeviceInfo too?
> Same with your check for child->bs, I don't think a BdrvChild without a
> bs can exist (or only while creating/destroying the BdrvChild, which
> holds the graph lock and doesn't allow monitor commands to run in the
> middle).
Okay, yes. There are other places that access child->bs without checking
already. I'll drop that check.
Best Regards,
Fiona