]> git.proxmox.com Git - mirror_qemu.git/commit
mirror: implement mirror_change method
authorFiona Ebner <f.ebner@proxmox.com>
Tue, 31 Oct 2023 13:54:26 +0000 (14:54 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 31 Oct 2023 17:20:29 +0000 (18:20 +0100)
commit2d400d15a02dca3b7b90761b2f0bb2322e99e11a
tree8610f49e785923dab03a9192f6b50588255cbc3a
parent7b32ad2242d6bcb1d5840466bf846fada8ca42e8
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>
block/mirror.c
qapi/block-core.json