From 2d400d15a02dca3b7b90761b2f0bb2322e99e11a Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Tue, 31 Oct 2023 14:54:26 +0100 Subject: 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 Message-ID: <20231031135431.393137-6-f.ebner@proxmox.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- qapi/block-core.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'qapi') 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: -- cgit v1.1