diff mbox series

[02/18] migration: Give one error if trying to set COMPRESSION and XBZRLE

Message ID 20230613145757.10131-3-quintela@redhat.com
State New
Headers show
Series Migration compression cleanup | expand

Commit Message

Juan Quintela June 13, 2023, 2:57 p.m. UTC
As we have disable to use both together in the previous patch, we can
remove this check.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration/options.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Lukas Straub June 22, 2023, 11:37 a.m. UTC | #1
On Tue, 13 Jun 2023 16:57:41 +0200
Juan Quintela <quintela@redhat.com> wrote:

> As we have disable to use both together in the previous patch, we can
> remove this check.

This commit message is off.

>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  migration/options.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/migration/options.c b/migration/options.c
> index c6674a4753..a18689c314 100644
> --- a/migration/options.c
> +++ b/migration/options.c
> @@ -554,6 +554,13 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
>          }
>      }
>
> +    if (new_caps[MIGRATION_CAPABILITY_COMPRESS]) {
> +        if (new_caps[MIGRATION_CAPABILITY_XBZRLE]) {
> +            error_setg(errp, "Compression is not compatible with xbzrle");
> +            return false;
> +        }
> +    }
> +
>      return true;
>  }
>
diff mbox series

Patch

diff --git a/migration/options.c b/migration/options.c
index c6674a4753..a18689c314 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -554,6 +554,13 @@  bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
         }
     }
 
+    if (new_caps[MIGRATION_CAPABILITY_COMPRESS]) {
+        if (new_caps[MIGRATION_CAPABILITY_XBZRLE]) {
+            error_setg(errp, "Compression is not compatible with xbzrle");
+            return false;
+        }
+    }
+
     return true;
 }