Re: [libvirt] [PATCH] Compressed save image format for Qemu.

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

 



Daniel P. Berrange wrote:
> On Thu, Aug 13, 2009 at 10:47:18AM +0200, Chris Lalancette wrote:
>> Implement a compressed save image format for qemu.  While ideally
>> we would have the choice between compressed/non-compressed
>> available to the libvirt API, unfortunately there is no "flags"
>> parameter to the virDomainSave() API.  Therefore, implement this
>> as a qemu.conf option.  Both gzip and bzip2 are implemented, and
>> it should be very easy to implement additional compression
>> methods.
>>
>> One open question is if/how we should detect the gzip and bzip2
>> binaries.  One way to do it is to do compile-time setting of the
>> paths (via configure.in), but that doesn't seem like a great thing
>> to do.  Another solution (my preferred solution) is not to detect
>> at all; when we go to run the commands that need them, if they
>> aren't available, or aren't available in one of the standard paths,
>> then we'll fail.  Maybe somebody else has another option or
>> opinion, though.
>>
>> In the future, we'll have a more robust (managed) save/restore API,
>> at which time we can expose this functionality properly in the API.
>>
>> V2: get rid of redundant dd command and just use >> to append data.
>> V3: Add back the missing pieces for the enum and bumping the save version.
>> V4: Make the compressed field in the save_header an int.
>>     Implement LZMA compression.
>>
>> Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
> 
> ACK, this looks good now.  Bonus points if you do a follow-up
> patch to add the new param to libvirtd_qemu.aug and
> test_libvirtd_qemu.aug.

OK, thanks, committed.  I'll follow up with a patch to augeas.  Oh, and...

>>      /* Set the migration source and start it up. */
>>      ret = qemudStartVMDaemon(conn, driver, vm, "stdio", fd);
>> +    if (intermediate_pid != -1) {
>> +        /* Wait for intermediate process to exit */
>> +        while (waitpid(intermediate_pid, &childstat, 0) == -1 &&
>> +               errno == EINTR);
>> +    }
>> +    if (intermediatefd != -1)
>> +        close(intermediatefd);
>>      close(fd);
>>      fd = -1;
>>      if (ret < 0) {
> 
> Oh actually need a VIR_FREE(driver->save_image_format) in qemudShutdown()

To fix this minor leak.

-- 
Chris Lalancette

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