summaryrefslogtreecommitdiffstats
path: root/qapi
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-05-12 15:53:01 -0400
committerMarkus Armbruster <armbru@redhat.com>2015-05-29 12:53:12 +0200
commit9abe3bdc45ced367fe034c0fdd7c686212389767 (patch)
tree61510db30667eb384a720e9020d7a01c1d637182 /qapi
parentba7c388963e099c0d2cedb7f048e30747ffff25d (diff)
downloadhqemu-9abe3bdc45ced367fe034c0fdd7c686212389767.zip
hqemu-9abe3bdc45ced367fe034c0fdd7c686212389767.tar.gz
qapi: add dirty bitmap status
Bitmaps can be in a handful of different states with potentially more to come as we tool around with migration and persistence patches. Management applications may need to know why certain bitmaps are unavailable for various commands, e.g. busy in another operation, busy being migrated, etc. Right now, all we offer is BlockDirtyInfo's boolean member 'frozen'. Instead of adding more booleans, replace it by an enumeration member 'status' with values 'active' and 'frozen'. Then add new value 'disabled'. Incompatible change. Fine because the changed part hasn't been released so far. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json23
1 files changed, 21 insertions, 2 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 863ffea..8411d4f 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -326,6 +326,25 @@
'data': 'bool', '*offset': 'int' } }
##
+# @DirtyBitmapStatus:
+#
+# An enumeration of possible states that a dirty bitmap can report to the user.
+#
+# @frozen: The bitmap is currently in-use by a backup operation or block job,
+# and is immutable.
+#
+# @disabled: The bitmap is currently in-use by an internal operation and is
+# read-only. It can still be deleted.
+#
+# @active: The bitmap is actively monitoring for new writes, and can be cleared,
+# deleted, or used for backup operations.
+#
+# Since: 2.4
+##
+{ 'enum': 'DirtyBitmapStatus',
+ 'data': ['active', 'disabled', 'frozen'] }
+
+##
# @BlockDirtyInfo:
#
# Block dirty bitmap information.
@@ -336,13 +355,13 @@
#
# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
#
-# @frozen: whether the dirty bitmap is frozen (Since 2.4)
+# @status: current status of the dirty bitmap (since 2.4)
#
# Since: 1.3
##
{ 'struct': 'BlockDirtyInfo',
'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32',
- 'frozen': 'bool'} }
+ 'status': 'DirtyBitmapStatus'} }
##
# @BlockInfo:
OpenPOWER on IntegriCloud