Re: [PATCH v4 4/4] qapi: Allow introspecting fix for savevm's cooperation with blockdev

2019-10-14 Thread Markus Armbruster
Kevin Wolf  writes:

> Am 11.10.2019 um 10:50 hat Markus Armbruster geschrieben:
>> From: Peter Krempa 
>> 
>> 'savevm' was buggy as it considered all monitor-owned block device
>> nodes for snapshot. With the introduction of -blockdev, the common
>> usage made all nodes including protocol and backing file nodes be
>> monitor-owned and thus considered for snapshot.
>> 
>> This is a problem since the 'file' protocol nodes can't have internal
>> snapshots and it does not make sense to take snapshot of nodes
>> representing backing files.
>> 
>> This was fixed by commit 05f4aced658a02b02. Clients need to be able to
>> detect whether this fix is present.
>> 
>> Since savevm does not have an QMP alternative, add the feature for the
>> 'human-monitor-command' backdoor which is used to call this command in
>> modern use.
>> 
>> Signed-off-by: Peter Krempa 
>> Reviewed-by: Markus Armbruster 
>> Signed-off-by: Markus Armbruster 
>> ---
>>  qapi/misc.json | 10 +-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>> 
>> diff --git a/qapi/misc.json b/qapi/misc.json
>> index 6bd11f50e6..35dca86ce7 100644
>> --- a/qapi/misc.json
>> +++ b/qapi/misc.json
>> @@ -1020,6 +1020,13 @@
>>  #
>>  # @cpu-index: The CPU to use for commands that require an implicit CPU
>>  #
>> +# Features:
>> +
>
> I think you want a # in this empty line.

I'll delete the line instead, so the Features part looks like the one we
already have in block-core.json.

>> +# @savevm-monitor-nodes: If present, HMP command savevm only snapshots
>> +#monitor-owned nodes if they have no parents.
>> +#This allows the use of 'savevm' with
>> +#-blockdev. (since 4.2)
>> +#
>>  # Returns: the output of the command as a string
>>  #
>>  # Since: 0.14.0
>> @@ -1047,7 +1054,8 @@
>>  ##
>>  { 'command': 'human-monitor-command',
>>'data': {'command-line': 'str', '*cpu-index': 'int'},
>> -  'returns': 'str' }
>> +  'returns': 'str',
>> +  'features': [ 'savevm-monitor-nodes' ] }
>
> With this fixed:
>
> Reviewed-by: Kevin Wolf 

Thanks!



Re: [PATCH v4 4/4] qapi: Allow introspecting fix for savevm's cooperation with blockdev

2019-10-14 Thread Kevin Wolf
Am 11.10.2019 um 10:50 hat Markus Armbruster geschrieben:
> From: Peter Krempa 
> 
> 'savevm' was buggy as it considered all monitor-owned block device
> nodes for snapshot. With the introduction of -blockdev, the common
> usage made all nodes including protocol and backing file nodes be
> monitor-owned and thus considered for snapshot.
> 
> This is a problem since the 'file' protocol nodes can't have internal
> snapshots and it does not make sense to take snapshot of nodes
> representing backing files.
> 
> This was fixed by commit 05f4aced658a02b02. Clients need to be able to
> detect whether this fix is present.
> 
> Since savevm does not have an QMP alternative, add the feature for the
> 'human-monitor-command' backdoor which is used to call this command in
> modern use.
> 
> Signed-off-by: Peter Krempa 
> Reviewed-by: Markus Armbruster 
> Signed-off-by: Markus Armbruster 
> ---
>  qapi/misc.json | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/qapi/misc.json b/qapi/misc.json
> index 6bd11f50e6..35dca86ce7 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -1020,6 +1020,13 @@
>  #
>  # @cpu-index: The CPU to use for commands that require an implicit CPU
>  #
> +# Features:
> +

I think you want a # in this empty line.

> +# @savevm-monitor-nodes: If present, HMP command savevm only snapshots
> +#monitor-owned nodes if they have no parents.
> +#This allows the use of 'savevm' with
> +#-blockdev. (since 4.2)
> +#
>  # Returns: the output of the command as a string
>  #
>  # Since: 0.14.0
> @@ -1047,7 +1054,8 @@
>  ##
>  { 'command': 'human-monitor-command',
>'data': {'command-line': 'str', '*cpu-index': 'int'},
> -  'returns': 'str' }
> +  'returns': 'str',
> +  'features': [ 'savevm-monitor-nodes' ] }

With this fixed:

Reviewed-by: Kevin Wolf 



[PATCH v4 4/4] qapi: Allow introspecting fix for savevm's cooperation with blockdev

2019-10-11 Thread Markus Armbruster
From: Peter Krempa 

'savevm' was buggy as it considered all monitor-owned block device
nodes for snapshot. With the introduction of -blockdev, the common
usage made all nodes including protocol and backing file nodes be
monitor-owned and thus considered for snapshot.

This is a problem since the 'file' protocol nodes can't have internal
snapshots and it does not make sense to take snapshot of nodes
representing backing files.

This was fixed by commit 05f4aced658a02b02. Clients need to be able to
detect whether this fix is present.

Since savevm does not have an QMP alternative, add the feature for the
'human-monitor-command' backdoor which is used to call this command in
modern use.

Signed-off-by: Peter Krempa 
Reviewed-by: Markus Armbruster 
Signed-off-by: Markus Armbruster 
---
 qapi/misc.json | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/qapi/misc.json b/qapi/misc.json
index 6bd11f50e6..35dca86ce7 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -1020,6 +1020,13 @@
 #
 # @cpu-index: The CPU to use for commands that require an implicit CPU
 #
+# Features:
+
+# @savevm-monitor-nodes: If present, HMP command savevm only snapshots
+#monitor-owned nodes if they have no parents.
+#This allows the use of 'savevm' with
+#-blockdev. (since 4.2)
+#
 # Returns: the output of the command as a string
 #
 # Since: 0.14.0
@@ -1047,7 +1054,8 @@
 ##
 { 'command': 'human-monitor-command',
   'data': {'command-line': 'str', '*cpu-index': 'int'},
-  'returns': 'str' }
+  'returns': 'str',
+  'features': [ 'savevm-monitor-nodes' ] }
 
 ##
 # @change:
-- 
2.21.0