qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/6] qapi: add block-dirty-bitma


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/6] qapi: add block-dirty-bitmap-enable/disable
Date: Mon, 5 Feb 2018 14:59:17 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

03.02.2018 19:09, Markus Armbruster wrote:
Vladimir Sementsov-Ogievskiy <address@hidden> writes:

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
  qapi/block-core.json | 42 ++++++++++++++++++++++++++++++++++++++++++
  blockdev.c           | 42 ++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 84 insertions(+)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 827254db22..b3851ee760 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1672,6 +1672,48 @@
    'data': 'BlockDirtyBitmap' }
##
+# @block-dirty-bitmap-enable:
+#
+# Enable dirty bitmap, so that it will continue tracking disk changes.
+#
+# Returns: nothing on success
+#          If @node is not a valid block device, DeviceNotFound
+#          If @name is not found, GenericError with an explanation
What do you mean by "with an explanation"?  If it's the error objects
@desc member: that's trivial, any error carries it.

The less error classes other than GenericError are used, the happier I
am...  Do users really need to distinguish between these two errors?

I've just used same semantics as it is used for block-dirty-bitmap-clear.. block-dirty-bitmap-remove and
block-dirty-bitmap-add have the same semantics too.


+#
+# Since: 2.12
+#
+# Example:
+#
+# -> { "execute": "block-dirty-bitmap-enable",
+#      "arguments": { "node": "drive0", "name": "bitmap0" } }
+# <- { "return": {} }
+#
+##
+  { 'command': 'block-dirty-bitmap-enable',
+    'data': 'BlockDirtyBitmap' }
+
+##
+# @block-dirty-bitmap-disable:
+#
+# Disable dirty bitmap, so that it will stop tracking disk changes.
+#
+# Returns: nothing on success
+#          If @node is not a valid block device, DeviceNotFound
+#          If @name is not found, GenericError with an explanation
Likewise.

+#
+# Since: 2.12
+#
+# Example:
+#
+# -> { "execute": "block-dirty-bitmap-disable",
+#      "arguments": { "node": "drive0", "name": "bitmap0" } }
+# <- { "return": {} }
+#
+##
+    { 'command': 'block-dirty-bitmap-disable',
+      'data': 'BlockDirtyBitmap' }
+
+##
  # @BlockDirtyBitmapSha256:
  #
  # SHA256 hash of dirty bitmap data
[...]


--
Best regards,
Vladimir




reply via email to

[Prev in Thread] Current Thread [Next in Thread]