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

Eric Blake eblake at redhat.com
Fri Apr 6 16:14:53 UTC 2012


On 04/06/2012 10:04 AM, Federico Simoncelli wrote:
> ----- Original Message -----
>> From: "Eric Blake" <eblake at redhat.com>
>> To: libvir-list at redhat.com
>> Cc: pbonzini at redhat.com, fsimonce at redhat.com
>> Sent: Friday, April 6, 2012 6:36:54 AM
>> Subject: [PATCHv2 08/15] blockjob: expose qemu commands for mirrored storage migration
>>
>> The new block copy storage migration sequence requires both the
>> 'drive-mirror' action in 'transaction' (present if the 'drive-mirror'
>> standalone monitor command also exists) and the 'drive-reopen'
>> monitor
>> command (it would be nice if that were also part of a 'transaction',
>> but the initial qemu implementation has it standalone only).
>>

>> +int
>> +qemuMonitorDriveMirror(qemuMonitorPtr mon, virJSONValuePtr actions,
>> +                       const char *device, const char *file,
>> +                       const char *format, int mode)
>> +{
>> +    int ret;
>> +
>> +    VIR_DEBUG("mon=%p, actions=%p, device=%s, file=%s, format=%s,
>> mode=%o",
>> +              mon, actions, device, file, format, mode);
>> +
>> +    if (!mon) {
>> +        qemuReportError(VIR_ERR_INVALID_ARG, "%s",
>> +                        _("monitor must not be NULL"));
>> +        return -1;
>> +    }
>> +
>> +    if (mon->json)
>> +        ret = qemuMonitorJSONDriveMirror(mon, actions, device, file,
>> format,
>> +                                         mode);
>> +    else
>> +        qemuReportError(VIR_ERR_INVALID_ARG, "%s",
>> +                        _("drive-mirror requires JSON monitor"));
> 
> You should set ret to -1 here (or return -1).

Yep.  Fixed in my tree for v3.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120406/53cca507/attachment-0001.sig>


More information about the libvir-list mailing list