]> xenbits.xensource.com Git - libvirt.git/commit
qemu: use -incoming fd:n to avoid qemu holding fd indefinitely
authorEric Blake <eblake@redhat.com>
Wed, 22 Dec 2010 22:13:29 +0000 (15:13 -0700)
committerEric Blake <eblake@redhat.com>
Mon, 17 Jan 2011 16:24:41 +0000 (09:24 -0700)
commit1859939a742f0559d1672a2f06515f1b129398c9
treec66ac8bf7af5db833825071b4db2e24f23548ddc
parente182ba872bdf3a7647afd31501b6dd0f33bab4ed
qemu: use -incoming fd:n to avoid qemu holding fd indefinitely

https://bugzilla.redhat.com/show_bug.cgi?id=620363

When using -incoming stdio or -incoming exec:, qemu keeps the
stdin fd open long after the migration is complete.  Not to
mention that exec:cat is horribly inefficient, by doubling the
I/O and going through a popen interface in qemu.

The new -incoming fd: of qemu 0.12.0 closes the fd after using
it, and allows us to bypass an intermediary cat process for
less I/O.

* src/qemu/qemu_command.h (qemuBuildCommandLine): Add parameter.
* src/qemu/qemu_command.c (qemuBuildCommandLine): Support
migration via fd: when possible.  Consolidate migration handling
into one spot, now that it is more complex.
* src/qemu/qemu_driver.c (qemudStartVMDaemon): Update caller.
* tests/qemuxml2argvtest.c (mymain): Likewise.
* tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.args: New file.
* tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml: Likewise.
src/qemu/qemu_command.c
src/qemu/qemu_command.h
src/qemu/qemu_driver.c
tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c