[libvirt] [PATCH 12/21] qemu: monitor: Add support for blockdev-backup via 'transaction'
Eric Blake
eblake at redhat.com
Wed Nov 27 18:11:12 UTC 2019
On 11/26/19 3:39 PM, Peter Krempa wrote:
> Implement the transaction actions generator for blockdev-backup.
>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> +{
> + const char *syncmodestr = qemuMonitorTransactionBackupSyncModeTypeToString(syncmode);
> +
> + return qemuMonitorJSONTransactionAdd(actions,
> + "blockdev-backup",
> + "s:device", device,
> + "s:job-id", jobname,
> + "s:target", target,
> + "s:sync", syncmodestr,
> + "S:bitmap", bitmap,
> + "T:auto-finalize", VIR_TRISTATE_BOOL_YES,
> + "T:auto-dismiss", VIR_TRISTATE_BOOL_NO,
My original code didn't use auto-finalize and auto-dismiss, but it
obviously makes sense given your addition of it for all other block
jobs. (We've improved a lot in the code base since my first
proof-of-concept a year ago...)
I also like that you added this in the monitor code (whereas I had
hacked it in via direct calls in qemu-driver.c).
Reviewed-by: Eric Blake <eblake at redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the libvir-list
mailing list