On 04.02.26 15:38, Markus Armbruster wrote:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:
Now we have blockdev-replace QMP command, which depend on a possibility to select any block parent (block node, block export, or qdev) by one unique name. The command fails, if name is ambiguous (i.e., match several parents of different types). In future we want to rid of this ambiguity.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
We have numerous kinds of IDs, i.e. names chosen by the user than need to be unique, but only among the same kind. For instance, you can't name two block nodes "foo", but you can name a block node, a block export, a qdev, and a network backend "foo". Using the same ID for multiple things is of course a bad idea. Permitting it was also a bad idea.
Your patch rectifies this design mistake, but only partially. Consider:
* IDs need to be unique with their kind. This is what we have now. I don't like it.
* IDs need to be unique among their kind and possibly some set of additional kinds. This is where your patch takes us. I like it even less, to be honest.
* IDs need to be unique, period. This is what I'd like to have.
I like it. Is it enough to write it so simple in deprecation doc? Or should we still list all such ids we have in QEMU? It may be something like: Any kind of IDs you use to reference objects in QEMU must be unique, any used ID must reference exactly one object. This includes, but is not limited to qdev full and relative to "/peripheral/" paths, block-node and block-export names. -- Best regards, Vladimir