aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-09-24 17:27:11 +0200
committerKevin Wolf <kwolf@redhat.com>2020-10-02 15:46:40 +0200
commit30dbc81d310cc5c78589ab689083371c4bfced1f (patch)
tree7e34f866a97b898cc010c72031b2ad99f945319c /qapi
parent8cade320c8838952b5f589c6df26b2e62dd099d7 (diff)
block/export: Move writable to BlockExportOptions
The 'writable' option is a basic option that will probably be applicable to most if not all export types that we will implement. Move it from NBD to the generic BlockExport layer. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-26-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.json15
1 files changed, 10 insertions, 5 deletions
diff --git a/qapi/block-export.json b/qapi/block-export.json
index 91b042b453..3ce4d6276b 100644
--- a/qapi/block-export.json
+++ b/qapi/block-export.json
@@ -74,9 +74,6 @@
# @description: Free-form description of the export, up to 4096 bytes.
# (Since 5.0)
#
-# @writable: Whether clients should be able to write to the device via the
-# NBD connection (default false).
-#
# @bitmap: Also export the dirty bitmap reachable from @device, so the
# NBD client can use NBD_OPT_SET_META_CONTEXT with
# "qemu:dirty-bitmap:NAME" to inspect the bitmap. (since 4.0)
@@ -85,7 +82,7 @@
##
{ 'struct': 'BlockExportOptionsNbd',
'data': { '*name': 'str', '*description': 'str',
- '*writable': 'bool', '*bitmap': 'str' } }
+ '*bitmap': 'str' } }
##
# @NbdServerAddOptions:
@@ -94,11 +91,15 @@
#
# @device: The device name or node name of the node to be exported
#
+# @writable: Whether clients should be able to write to the device via the
+# NBD connection (default false).
+#
# Since: 5.0
##
{ 'struct': 'NbdServerAddOptions',
'base': 'BlockExportOptionsNbd',
- 'data': { 'device': 'str' } }
+ 'data': { 'device': 'str',
+ '*writable': 'bool' } }
##
# @nbd-server-add:
@@ -188,6 +189,9 @@
#
# @node-name: The node name of the block node to be exported (since: 5.2)
#
+# @writable: True if clients should be able to write to the export
+# (default false)
+#
# @writethrough: If true, caches are flushed after every write request to the
# export before completion is signalled. (since: 5.2;
# default: false)
@@ -198,6 +202,7 @@
'base': { 'type': 'BlockExportType',
'id': 'str',
'node-name': 'str',
+ '*writable': 'bool',
'*writethrough': 'bool' },
'discriminator': 'type',
'data': {