> -----Original Message-----
> From: Vladimir Sementsov-Ogievskiy <[email protected]>
> Sent: Saturday, April 29, 2023 3:49 AM
> To: [email protected]
> Cc: [email protected]; [email protected]; Zhang, Chen
> <[email protected]>; [email protected]; Peter Xu
> <[email protected]>; Leonardo Bras <[email protected]>
> Subject: [PATCH v4 10/10] migration: block incoming colo when capability is
> disabled
>
> We generally require same set of capabilities on source and target.
> Let's require x-colo capability to use COLO on target.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
>
Reviewed-by: Zhang Chen <[email protected]>
Thanks
Chen
---
> migration/migration.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/migration/migration.c b/migration/migration.c index
> 8c5bbf3e94..5e162c0622 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -395,6 +395,12 @@ int migration_incoming_enable_colo(void)
> return -ENOTSUP;
> #endif
>
> + if (!migrate_colo()) {
> + error_report("ENABLE_COLO command come in migration stream, but
> c-colo "
> + "capability is not set");
> + return -EINVAL;
> + }
> +
> if (ram_block_discard_disable(true)) {
> error_report("COLO: cannot disable RAM discard");
> return -EBUSY;
> --
> 2.34.1