aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorFiona Ebner <f.ebner@proxmox.com>2023-10-31 14:54:26 +0100
committerKevin Wolf <kwolf@redhat.com>2023-10-31 18:20:29 +0100
commit2d400d15a02dca3b7b90761b2f0bb2322e99e11a (patch)
tree8610f49e785923dab03a9192f6b50588255cbc3a /qapi
parent7b32ad2242d6bcb1d5840466bf846fada8ca42e8 (diff)
downloadqemu-2d400d15a02dca3b7b90761b2f0bb2322e99e11a.zip
qemu-2d400d15a02dca3b7b90761b2f0bb2322e99e11a.tar.gz
qemu-2d400d15a02dca3b7b90761b2f0bb2322e99e11a.tar.bz2
mirror: implement mirror_change method
which allows switching the @copy-mode from 'background' to 'write-blocking'. This is useful for management applications, so they can start out in background mode to avoid limiting guest write speed and switch to active mode when certain criteria are fulfilled. In presence of an iothread, the copy_mode member is now shared between the iothread and the main thread, so turn accesses to it atomic. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Message-ID: <20231031135431.393137-6-f.ebner@proxmox.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json13
1 files changed, 12 insertions, 1 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index c6f31a9..6369207 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -3045,6 +3045,17 @@
'allow-preconfig': true }
##
+# @BlockJobChangeOptionsMirror:
+#
+# @copy-mode: Switch to this copy mode. Currently, only the switch
+# from 'background' to 'write-blocking' is implemented.
+#
+# Since: 8.2
+##
+{ 'struct': 'BlockJobChangeOptionsMirror',
+ 'data': { 'copy-mode' : 'MirrorCopyMode' } }
+
+##
# @BlockJobChangeOptions:
#
# Block job options that can be changed after job creation.
@@ -3058,7 +3069,7 @@
{ 'union': 'BlockJobChangeOptions',
'base': { 'id': 'str', 'type': 'JobType' },
'discriminator': 'type',
- 'data': {} }
+ 'data': { 'mirror': 'BlockJobChangeOptionsMirror' } }
##
# @block-job-change: