Patchwork [RFC,V6,02/33] qmp: Add DedupStatus enum.

login
register
mail settings
Submitter Benoît Canet
Date Feb. 6, 2013, 12:31 p.m.
Message ID <1360153926-9492-3-git-send-email-benoit@irqsave.net>
Download mbox | patch
Permalink /patch/218582/
State New
Headers show

Comments

Benoît Canet - Feb. 6, 2013, 12:31 p.m.
---
 qapi-schema.json |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Stefan Hajnoczi - Feb. 6, 2013, 4:08 p.m.
On Wed, Feb 06, 2013 at 01:31:35PM +0100, Benoît Canet wrote:
>  ##
> +# @DedupStatus
> +#
> +# An enumeration of a virtual block device deduplication status.
> +#
> +# @stopped:  The deduplication has been stopped
> +#
> +# @starting: The deduplication is starting
> +#
> +# @started:  The deduplication is started
> +#
> +# @stopping: The deduplication is stopping
> +#
> +# Since: 1.5.0
> +##
> +{ 'enum': 'DedupStatus', 'data': [ 'stopped', 'starting', 'started',
> +                                   'stopping' ] }

Makes me wonder if there is a more generic type here - seems almost like
BlockJob, which itself should have been a more generic abstraction for
long-running operations whose status can be queried and which can be
stopped.

Stefan

Patch

diff --git a/qapi-schema.json b/qapi-schema.json
index cdd8384..cf4e9d6 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -796,6 +796,24 @@ 
 { 'command': 'query-block', 'returns': ['BlockInfo'] }
 
 ##
+# @DedupStatus
+#
+# An enumeration of a virtual block device deduplication status.
+#
+# @stopped:  The deduplication has been stopped
+#
+# @starting: The deduplication is starting
+#
+# @started:  The deduplication is started
+#
+# @stopping: The deduplication is stopping
+#
+# Since: 1.5.0
+##
+{ 'enum': 'DedupStatus', 'data': [ 'stopped', 'starting', 'started',
+                                   'stopping' ] }
+
+##
 # @BlockDeviceStats:
 #
 # Statistics of a virtual block device or a block backing device.