[Top][All Lists]

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

Re: [Qemu-block] [PATCH 4/4] qapi: new qmp command nbd-server-add-bitmap

From: Eric Blake
Subject: Re: [Qemu-block] [PATCH 4/4] qapi: new qmp command nbd-server-add-bitmap
Date: Wed, 21 Mar 2018 12:33:22 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/21/2018 07:19 AM, Vladimir Sementsov-Ogievskiy wrote:
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
  qapi/block.json | 27 +++++++++++++++++++++++++++
  blockdev-nbd.c  | 23 +++++++++++++++++++++++
  2 files changed, 50 insertions(+)

diff --git a/qapi/block.json b/qapi/block.json
index c694524002..4afbbcd7b7 100644
--- a/qapi/block.json
+++ b/qapi/block.json
@@ -269,6 +269,33 @@
    'data': {'name': 'str', '*mode': 'NbdServerRemoveMode'} }
+# @nbd-server-add-bitmap:
+# Export dirty bitmap through selected export. Bitmaps are searched for in
+# device attached to the export and in all its backings. Exported bitmap
+# is locked until NBD export is removed.

Expose a dirty bitmap associated with the selected export. The bitmap search starts at the device attached to the export, and includes all backing files. The exported bitmap is then locked until the NBD export is removed.

+# @name: Export name.
+# @bitmap: Bitmap name to search.

s/search./search for./

+# @bitmap-export-name: How the bitmap will be seen by nbd clients
+#                      (default @bitmap)

Maybe mention that the client must use NBD_OPT_SET_META_CONTEXT with a query of "qemu-dirty-bitmap:NAME" (where NAME matches bitmap-export-name) to access the exposed bitmap. (May need to be adjusted by my suggestion to use just the namespace "qemu:")

+# Returns: error on one of the following conditions:
+#           - the server is not running
+#           - export is not found
+#           - bitmap is not found
+#           - bitmap is disabled
+#           - bitmap is locked

Do we really need to list all the error conditions? My worry is that a list this specific might go stale, compared to the obvious default that the command succeeds only if it was able to expose the bitmap and that the error message is specific enough for a human to figure out what to fix if it failed.

+# Since: 2.13
+  { 'command': 'nbd-server-add-bitmap',
+    'data': {'name': 'str', 'bitmap': 'str', '*bitmap-export-name': 'str'} }

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

reply via email to

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