[PATCH] qemu_saveimage: add zstd to supported compression formats

Adam Julis posted 1 patch 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/52b8be2bfa46ab1bf67c34d362ac6efccd275802.1714156085.git.ajulis@redhat.com
libvirt.spec.in           | 1 +
src/qemu/qemu.conf.in     | 7 +++----
src/qemu/qemu_saveimage.c | 2 ++
3 files changed, 6 insertions(+), 4 deletions(-)
[PATCH] qemu_saveimage: add zstd to supported compression formats
Posted by Adam Julis 1 week, 3 days ago
Extend the list of supported formats, update and clarify comment
in qemu.conf.in (removed misleading sentence about the order of
compression format types).

Signed-off-by: Adam Julis <ajulis@redhat.com>
---
 libvirt.spec.in           | 1 +
 src/qemu/qemu.conf.in     | 7 +++----
 src/qemu/qemu_saveimage.c | 2 ++
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 64018192b6..88c62f6d92 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -815,6 +815,7 @@ Requires: gzip
 Requires: bzip2
 Requires: lzop
 Requires: xz
+Requires: zstd
 Requires: systemd-container
 Requires: swtpm-tools
         %if %{with_numad}
diff --git a/src/qemu/qemu.conf.in b/src/qemu/qemu.conf.in
index f406df8749..6bc2140dcb 100644
--- a/src/qemu/qemu.conf.in
+++ b/src/qemu/qemu.conf.in
@@ -582,10 +582,9 @@
 # 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
 # a bit of space.  If you would like to compress the images while they
-# are being saved to disk, you can also set "lzop", "gzip", "bzip2", or "xz"
-# for save_image_format.  Note that this means you slow down the process of
-# saving a domain in order to save disk space; the list above is in descending
-# order by performance and ascending order by compression ratio.
+# are being saved to disk, you can also set "zstd", "lzop", "gzip", "bzip2",
+# or "xz" for save_image_format. Note that this means you slow down the process
+# of saving a domain in order to save disk space.
 #
 # save_image_format is used when you use 'virsh save' or 'virsh managedsave'
 # at scheduled saving, and it is an error if the specified save_image_format
diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c
index 89112e3e44..018ab5a222 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -47,6 +47,7 @@ typedef enum {
      */
     QEMU_SAVE_FORMAT_XZ = 3,
     QEMU_SAVE_FORMAT_LZOP = 4,
+    QEMU_SAVE_FORMAT_ZSTD = 5,
     /* Note: add new members only at the end.
        These values are used in the on-disk format.
        Do not change or re-use numbers. */
@@ -62,6 +63,7 @@ VIR_ENUM_IMPL(qemuSaveCompression,
               "bzip2",
               "xz",
               "lzop",
+              "zstd",
 );
 
 static inline void
-- 
2.44.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH] qemu_saveimage: add zstd to supported compression formats
Posted by Michal Prívozník 16 hours ago
On 4/26/24 20:28, Adam Julis wrote:
> Extend the list of supported formats, update and clarify comment
> in qemu.conf.in (removed misleading sentence about the order of
> compression format types).
> 
> Signed-off-by: Adam Julis <ajulis@redhat.com>

Commit message is a great place to put link to the issue you're fixing.
Something like:

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/589

> ---
>  libvirt.spec.in           | 1 +
>  src/qemu/qemu.conf.in     | 7 +++----
>  src/qemu/qemu_saveimage.c | 2 ++
>  3 files changed, 6 insertions(+), 4 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and merged. Will you post a follow up NEWS.rst patch pelase?

Michal
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org