add both multifd compression and number of multifd channels
Signed-off-by: Claudio Fontana <cfontana(a)suse.de>
---
src/qemu/qemu_saveimage.c | 17 +++++++++++++++++
src/qemu/qemu_saveimage.h | 4 +++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c
index 2b56214f90..e2cca4a417 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -67,6 +67,23 @@ VIR_ENUM_IMPL(qemuSaveCompression,
"lzop",
);
+typedef enum {
+ QEMU_SAVE_MULTIFD_COMP_NONE = 0,
+ QEMU_SAVE_MULTIFD_COMP_ZLIB = 1,
+ QEMU_SAVE_MULTIFD_COMP_ZSTD = 2,
+
+ /* used for the on-disk format, do not change/re-use numbers */
+ QEMU_SAVE_MULTIFD_COMP_LAST
+} virQEMUSaveMultiFdComp;
+
+VIR_ENUM_DECL(qemuSaveMultiFdComp);
+VIR_ENUM_IMPL(qemuSaveMultiFdComp,
+ QEMU_SAVE_MULTIFD_COMP_LAST,
+ "none",
+ "zlib",
+ "zstd",
+);
+
static inline void
qemuSaveImageBswapHeader(virQEMUSaveHeader *hdr)
{
diff --git a/src/qemu/qemu_saveimage.h b/src/qemu/qemu_saveimage.h
index 9d66eb40bb..21e335b530 100644
--- a/src/qemu/qemu_saveimage.h
+++ b/src/qemu/qemu_saveimage.h
@@ -42,7 +42,9 @@ struct _virQEMUSaveHeader {
uint32_t was_running; /* 4 bytes */
uint32_t compressed; /* 4 bytes */
uint32_t cookieOffset; /* 4 bytes */
- uint32_t unused[14]; /* 56 bytes */
+ uint16_t multifd_channels; /* 2 bytes */
+ uint16_t multifd_comp; /* 2 bytes */
+ uint32_t unused[13]; /* 52 bytes */
} ATTRIBUTE_PACKED; /* = 92 bytes */
--
2.35.3