From faecd40a592dbd8f12d2b3b4783fa05ae22364ea Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 14 Jul 2016 16:37:58 -0600 Subject: block: Simplify drive-mirror Now that we can support boxed commands, use it to greatly reduce the number of parameters (and likelihood of getting out of sync) when adjusting drive-mirror parameters. Signed-off-by: Eric Blake Reviewed-by: John Snow Message-Id: <1468535878-3760-1-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/block-core.json | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index 3d4b071385..f4f3ef970e 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1120,6 +1120,21 @@ # # Start mirroring a block device's writes to a new destination. # +# See DriveMirror for parameter descriptions +# +# Returns: nothing on success +# If @device is not a valid block device, DeviceNotFound +# +# Since 1.3 +## +{ 'command': 'drive-mirror', 'boxed': true, + 'data': 'DriveMirror' } + +## +# DriveMirror +# +# A set of parameters describing drive mirror setup. +# # @job-id: #optional identifier for the newly-created block job. If # omitted, the device name will be used. (Since 2.7) # @@ -1169,12 +1184,9 @@ # written. Both will result in identical contents. # Default is true. (Since 2.4) # -# Returns: nothing on success -# If @device is not a valid block device, DeviceNotFound -# # Since 1.3 ## -{ 'command': 'drive-mirror', +{ 'struct': 'DriveMirror', 'data': { '*job-id': 'str', 'device': 'str', 'target': 'str', '*format': 'str', '*node-name': 'str', '*replaces': 'str', 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', -- cgit v1.2.3-55-g7522