[libvirt] [RFC PATCHv4 15/15] qemu: support fd: migration with compression
Daniel P. Berrange
berrange at redhat.com
Thu Mar 10 12:21:33 UTC 2011
On Wed, Mar 09, 2011 at 07:18:33PM -0700, Eric Blake wrote:
> Spawn the compressor ourselves, instead of requiring the shell.
>
> * src/qemu/qemu_driver.c (qemuDomainMigrateToFile): Spawn
> compression helper process when needed.
> ---
> src/qemu/qemu_driver.c | 37 ++++++++++++++++++++++++++++++++-----
> 1 files changed, 32 insertions(+), 5 deletions(-)
ACK
> cleanup:
> + VIR_FORCE_CLOSE(pipeFD[0]);
> + VIR_FORCE_CLOSE(pipeFD[1]);
> + /* FIXME - virCommandWait can overwrite errors; need to add
> + * virCommandKill that does the job silently */
> + ignore_value(virCommandWait(cmd, NULL));
> + virCommandFree(cmd);
You can do
virErrorPtr orig_err;
...
cleanup:
orig_err = virSaveLastError();
...code which may overwrite errors...
if (orig_err) {
virSetError(orig_err);
virFreeError(orig_err);
}
REgards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list