aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-09-24 17:27:04 +0200
committerKevin Wolf <kwolf@redhat.com>2020-10-02 15:46:40 +0200
commitd53be9ce55a38e430b88985f637f696bf99cbf0b (patch)
treec187d28dd2fbfc9afad07cf3525d3203b52fe6a8 /qapi
parentbc4ee65b8c309ed6a726e3ea1b73f7fa31b4bb95 (diff)
downloadqemu-d53be9ce55a38e430b88985f637f696bf99cbf0b.zip
qemu-d53be9ce55a38e430b88985f637f696bf99cbf0b.tar.gz
qemu-d53be9ce55a38e430b88985f637f696bf99cbf0b.tar.bz2
block/export: Add 'id' option to block-export-add
We'll need an id to identify block exports in monitor commands. This adds one. Note that this is different from the 'name' option in the NBD server, which is the externally visible export name. While block export ids need to be unique in the whole process, export names must be unique only for the same server. Different export types or (potentially in the future) multiple NBD servers can have the same export name externally, but still need different block export ids internally. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-19-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-export.json5
1 files changed, 5 insertions, 0 deletions
diff --git a/qapi/block-export.json b/qapi/block-export.json
index 1091c97..658bdf0 100644
--- a/qapi/block-export.json
+++ b/qapi/block-export.json
@@ -105,6 +105,8 @@
#
# Export a block node to QEMU's embedded NBD server.
#
+# The export name will be used as the id for the resulting block export.
+#
# Returns: error if the server is not running, or export with the same name
# already exists.
#
@@ -182,6 +184,8 @@
# Describes a block export, i.e. how single node should be exported on an
# external interface.
#
+# @id: A unique identifier for the block export (across all export types)
+#
# @node-name: The node name of the block node to be exported (since: 5.2)
#
# @writethrough: If true, caches are flushed after every write request to the
@@ -192,6 +196,7 @@
##
{ 'union': 'BlockExportOptions',
'base': { 'type': 'BlockExportType',
+ 'id': 'str',
'node-name': 'str',
'*writethrough': 'bool' },
'discriminator': 'type',