mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
Reintroduce support for lzop compression
lzop was removed due to some confusion over whether it provided functional advantages distinct from xz. This has been addressed in the mailing list post archived at http://permalink.gmane.org/gmane.comp.emulators.libvirt/16487, and support for lzop is re-added here. * libvirt.spec.in: add dependancy on lzop * src/qemu.conf: update documentation of save_image_format * src/qemu_driver.c: re-add lzop compression option
This commit is contained in:
parent
c5a305584f
commit
8d4ed2ad3d
@ -117,6 +117,7 @@ Requires: /usr/bin/qemu-img
|
|||||||
# For image compression
|
# For image compression
|
||||||
Requires: gzip
|
Requires: gzip
|
||||||
Requires: bzip2
|
Requires: bzip2
|
||||||
|
Requires: lzop
|
||||||
Requires: xz
|
Requires: xz
|
||||||
%else
|
%else
|
||||||
%if %{with_xen}
|
%if %{with_xen}
|
||||||
|
@ -134,9 +134,10 @@
|
|||||||
# memory from the domain is dumped out directly to a file. If you have
|
# memory from the domain is dumped out directly to a file. If you have
|
||||||
# guests with a large amount of memory, however, this can take up quite
|
# guests with a large amount of memory, however, this can take up quite
|
||||||
# a bit of space. If you would like to compress the images while they
|
# a bit of space. If you would like to compress the images while they
|
||||||
# are being saved to disk, you can also set "gzip", "bzip2", "lzma", "xz",
|
# are being saved to disk, you can also set "lzop", "gzip", "bzip2", or "xz"
|
||||||
# or "lzop" for save_image_format. Note that this means you slow down
|
# for save_image_format. Note that this means you slow down the process of
|
||||||
# the process of saving a domain in order to save disk space.
|
# saving a domain in order to save disk space; the list above is in descending
|
||||||
|
# order by performance and ascending order by compression ratio.
|
||||||
#
|
#
|
||||||
# save_image_format = "raw"
|
# save_image_format = "raw"
|
||||||
|
|
||||||
|
@ -3624,10 +3624,10 @@ enum qemud_save_formats {
|
|||||||
QEMUD_SAVE_FORMAT_BZIP2 = 2,
|
QEMUD_SAVE_FORMAT_BZIP2 = 2,
|
||||||
/*
|
/*
|
||||||
* Deprecated by xz and never used as part of a release
|
* Deprecated by xz and never used as part of a release
|
||||||
* QEMUD_SAVE_FORMAT_LZMA,
|
* QEMUD_SAVE_FORMAT_LZMA
|
||||||
* QEMUD_SAVE_FORMAT_LZOP,
|
|
||||||
*/
|
*/
|
||||||
QEMUD_SAVE_FORMAT_XZ = 3,
|
QEMUD_SAVE_FORMAT_XZ = 3,
|
||||||
|
QEMUD_SAVE_FORMAT_LZOP = 4,
|
||||||
/* Note: add new members only at the end.
|
/* Note: add new members only at the end.
|
||||||
These values are used in the on-disk format.
|
These values are used in the on-disk format.
|
||||||
Do not change or re-use numbers. */
|
Do not change or re-use numbers. */
|
||||||
@ -3640,7 +3640,8 @@ VIR_ENUM_IMPL(qemudSaveCompression, QEMUD_SAVE_FORMAT_LAST,
|
|||||||
"raw",
|
"raw",
|
||||||
"gzip",
|
"gzip",
|
||||||
"bzip2",
|
"bzip2",
|
||||||
"xz")
|
"xz",
|
||||||
|
"lzop")
|
||||||
|
|
||||||
struct qemud_save_header {
|
struct qemud_save_header {
|
||||||
char magic[sizeof(QEMUD_SAVE_MAGIC)-1];
|
char magic[sizeof(QEMUD_SAVE_MAGIC)-1];
|
||||||
@ -4384,6 +4385,8 @@ static int qemudDomainRestore(virConnectPtr conn,
|
|||||||
intermediate_argv[0] = "bzip2";
|
intermediate_argv[0] = "bzip2";
|
||||||
else if (header.compressed == QEMUD_SAVE_FORMAT_XZ)
|
else if (header.compressed == QEMUD_SAVE_FORMAT_XZ)
|
||||||
intermediate_argv[0] = "xz";
|
intermediate_argv[0] = "xz";
|
||||||
|
else if (header.compressed == QEMUD_SAVE_FORMAT_LZOP)
|
||||||
|
intermediate_argv[0] = "lzop";
|
||||||
else if (header.compressed != QEMUD_SAVE_FORMAT_RAW) {
|
else if (header.compressed != QEMUD_SAVE_FORMAT_RAW) {
|
||||||
qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
|
qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
|
||||||
_("Unknown compressed save format %d"),
|
_("Unknown compressed save format %d"),
|
||||||
|
Loading…
Reference in New Issue
Block a user