Re: [PATCHv4 04/15] qemu: support migration to fd

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

 



On 03/10/2011 05:01 AM, Daniel P. Berrange wrote:
> On Wed, Mar 09, 2011 at 06:45:44PM -0700, Eric Blake wrote:
>> * src/qemu/qemu_monitor.h (qemuMonitorMigrateToFd): New
>> prototype.
>> * src/qemu/qemu_monitor.c (qemuMonitorMigrateToFd): New function.
>> ---
>>  src/qemu/qemu_monitor.c |   31 +++++++++++++++++++++++++++++++
>>  src/qemu/qemu_monitor.h |    4 ++++
>>  2 files changed, 35 insertions(+), 0 deletions(-)
> 
> ACK

Thanks; pushed.

>> +    if (qemuMonitorSendFileHandle(mon, "migrate", fd) < 0)
>> +        return -1;
>> +
>> +    if (mon->json)
>> +        ret = qemuMonitorJSONMigrate(mon, flags, "fd:migrate");
>> +    else
>> +        ret = qemuMonitorTextMigrate(mon, flags, "fd:migrate");
>> +
>> +    if (ret < 0) {
>> +        if (qemuMonitorCloseFileHandle(mon, "migrate") < 0)
>> +            VIR_WARN0("failed to close migration handle");
>> +    }
>> +
>> +    return ret;
>> +}
> 
> It is a nice idea todo the SendFileHAndle/CloseFileHandle
> calls from here, rather than in the qemu_driver code
> itself. It makes the latter much clearer - we should think
> about whether it makes sense to rewrite the NIC hotplug
> code to work this way too.

Agreed; I'll submit a patch for that shortly.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]