Signed-off-by: Claudio Fontana <cfontana(a)suse.de>
---
src/qemu/qemu_saveimage.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c
index 2598927eeb..4fd2485fc5 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -756,6 +756,23 @@ int qemuSaveImageLoadMultiFd(virConnectPtr conn, virDomainObj *vm,
int oflags,
QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS,
nchannels) < 0)
goto cleanup;
+ if (virQEMUCapsGet(priv->qemuCaps,
QEMU_CAPS_MIGRATION_PARAM_MULTIFD_COMPRESSION)) {
+ const char *pcomp =
qemuSaveMultiFdCompTypeToString(data->header.multifd_comp);
+ if (!pcomp) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+ _("libvirt does not support parallel compression type
%u"),
+ data->header.multifd_comp);
+ goto cleanup;
+ }
+ if (qemuMigrationParamsSetString(migParams,
+ QEMU_MIGRATION_PARAM_MULTIFD_COMPRESSION,
+ pcomp) < 0)
+ goto cleanup;
+ } else if (data->header.multifd_comp != QEMU_SAVE_MULTIFD_COMP_NONE) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("QEMU does not seem to support multifd
compression"));
+ goto cleanup;
+ }
if (qemuMigrationParamsApply(driver, vm, asyncJob, migParams) < 0)
goto cleanup;
--
2.35.3