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 8af9b92b35..7d8527596a 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 dcc9aa7d63..2af873dea9 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.26.2