From d06107ade0ce74dc39739bac80de84b51ec18546 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 13 Jun 2018 20:18:21 +0200 Subject: block/mirror: Add active mirroring This patch implements active synchronous mirroring. In active mode, the passive mechanism will still be in place and is used to copy all initially dirty clusters off the source disk; but every write request will write data both to the source and the target disk, so the source cannot be dirtied faster than data is mirrored to the target. Also, once the block job has converged (BLOCK_JOB_READY sent), source and target are guaranteed to stay in sync (unless an error occurs). Active mode is completely optional and currently disabled at runtime. A later patch will add a way for users to enable it. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Message-id: 20180613181823.13618-13-mreitz@redhat.com Signed-off-by: Max Reitz --- qapi/block-core.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'qapi/block-core.json') diff --git a/qapi/block-core.json b/qapi/block-core.json index ab629d1647..96f8da1322 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1050,6 +1050,24 @@ { 'enum': 'MirrorSyncMode', 'data': ['top', 'full', 'none', 'incremental'] } +## +# @MirrorCopyMode: +# +# An enumeration whose values tell the mirror block job when to +# trigger writes to the target. +# +# @background: copy data in background only. +# +# @write-blocking: when data is written to the source, write it +# (synchronously) to the target as well. In +# addition, data is copied in background just like in +# @background mode. +# +# Since: 3.0 +## +{ 'enum': 'MirrorCopyMode', + 'data': ['background', 'write-blocking'] } + ## # @BlockJobInfo: # -- cgit v1.2.3