[Qemu-devel] [PATCH] qapi: birtmap-merge: document name change

John Snow posted 1 patch 7 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180919190934.16284-1-jsnow@redhat.com
Test docker-clang@ubuntu failed
Test checkpatch passed
qapi/block-core.json | 2 ++
1 file changed, 2 insertions(+)
[Qemu-devel] [PATCH] qapi: birtmap-merge: document name change
Posted by John Snow 7 years, 4 months ago
We named these using underscores instead of the preferred dash,
document this nearby so we cannot possibly forget to rectify this
when we remove the 'x-' prefixes when the feature becomes stable.

We do not implement the change ahead of time to avoid more work
for libvirt to do in order to figure out how to use the beta version
of the API needlessly.

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
 qapi/block-core.json | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 4c7a37afdc..3611063073 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1894,6 +1894,8 @@
 ##
 # @x-block-dirty-bitmap-merge:
 #
+# FIXME: Rename @src_name and @dst_name to src-name and dst-name.
+#
 # Merge @src_name dirty bitmap to @dst_name dirty bitmap. @src_name dirty
 # bitmap is unchanged. On error, @dst_name is unchanged.
 #
-- 
2.14.4


Re: [Qemu-devel] [PATCH] qapi: birtmap-merge: document name change
Posted by Eric Blake 7 years, 4 months ago
On 9/19/18 2:09 PM, John Snow wrote:
> We named these using underscores instead of the preferred dash,
> document this nearby so we cannot possibly forget to rectify this
> when we remove the 'x-' prefixes when the feature becomes stable.
> 
> We do not implement the change ahead of time to avoid more work
> for libvirt to do in order to figure out how to use the beta version
> of the API needlessly.

Indeed, deferring the spelling change until the name switch from 'x-' to 
stable is an easily visible witness (via 'query-commands'), but 
prematurely changing the name of the parameters for two different 
versions of qemu while keeping the command named 'x-' (if we don't think 
the feature is ready to promote to stable in for 3.1) would mean 
resorting to the more computationally-expensive 'query-qmp-schema'.

> 
> Reported-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   qapi/block-core.json | 2 ++
>   1 file changed, 2 insertions(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 4c7a37afdc..3611063073 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1894,6 +1894,8 @@
>   ##
>   # @x-block-dirty-bitmap-merge:
>   #
> +# FIXME: Rename @src_name and @dst_name to src-name and dst-name.
> +#
>   # Merge @src_name dirty bitmap to @dst_name dirty bitmap. @src_name dirty
>   # bitmap is unchanged. On error, @dst_name is unchanged.
>   #
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] qapi: birtmap-merge: document name change
Posted by Eric Blake 7 years, 4 months ago
On 9/19/18 2:09 PM, John Snow wrote:

In the subject-line: s/birtmap/bitmap/

> We named these using underscores instead of the preferred dash,
> document this nearby so we cannot possibly forget to rectify this
> when we remove the 'x-' prefixes when the feature becomes stable.
> 
> We do not implement the change ahead of time to avoid more work
> for libvirt to do in order to figure out how to use the beta version
> of the API needlessly.
> 
> Reported-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   qapi/block-core.json | 2 ++
>   1 file changed, 2 insertions(+)

I can add this to my NBD queue, if desired.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] qapi: birtmap-merge: document name change
Posted by Markus Armbruster 7 years, 4 months ago
Eric Blake <eblake@redhat.com> writes:

> On 9/19/18 2:09 PM, John Snow wrote:
>
> In the subject-line: s/birtmap/bitmap/
>
>> We named these using underscores instead of the preferred dash,
>> document this nearby so we cannot possibly forget to rectify this
>> when we remove the 'x-' prefixes when the feature becomes stable.
>>
>> We do not implement the change ahead of time to avoid more work
>> for libvirt to do in order to figure out how to use the beta version
>> of the API needlessly.
>>
>> Reported-by: Eric Blake <eblake@redhat.com>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>>   qapi/block-core.json | 2 ++
>>   1 file changed, 2 insertions(+)
>
> I can add this to my NBD queue, if desired.

Please do.