[libvirt] [PATCHv4 04/15] qemu: support migration to fd
Eric Blake
eblake at redhat.com
Tue Mar 15 23:06:57 UTC 2011
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 at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110315/2e8efcae/attachment-0001.sig>
More information about the libvir-list
mailing list