Re: [PATCHv2 08/15] blockjob: expose qemu commands for mirrored storage migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 06/04/2012 06:36, Eric Blake ha scritto:
> +int
> +qemuMonitorJSONDriveMirror(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
> +                           virJSONValuePtr actions,
> +                           const char *device, const char *file,
> +                           const char *format, int mode)
> +{
> +    int ret = -1;
> +    virJSONValuePtr cmd;
> +
> +    cmd = qemuMonitorJSONMakeCommandRaw(true,
> +                                        "drive-mirror",
> +                                        "s:device", device,
> +                                        "s:target", file,
> +                                        "s:format", format,
> +                                        "s:mode",
> +                                        qemuMonitorDriveMirrorTypeToString(mode),
> +                                        NULL);
> +    if (!cmd)
> +        return -1;
> +
> +    if (virJSONValueArrayAppend(actions, cmd) < 0) {
> +        virReportOOMError();
> +        goto cleanup;
> +    }

Here it would be nice to invoke the command directly if actions is NULL.
 Right now there is no certainty that drive-mirror will be
transactionable in upstream QEMU, so it is safer to invoke it outside a
transaction in patch 11.

Paolo

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]