On Tue, Oct 29, 2024 at 08:39:06PM +0530, Prasad Pandit wrote:
> From: Prasad Pandit <p...@fedoraproject.org>
> 
> Remove multifd capability check with Postcopy mode.
> This helps to enable both multifd and postcopy together.
> 
> Update migrate_multifd() to return false when migration
> reaches Postcopy phase. In Postcopy phase, source guest
> is paused, so the migration threads on the source stop
> sending/pushing data on the channels. The destination
> guest starts running and Postcopy threads there begin
> to request/pull data from the source side.
> 
> Signed-off-by: Prasad Pandit <p...@fedoraproject.org>
> ---
>  migration/options.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/migration/options.c b/migration/options.c
> index ad8d6989a8..47c5137d5f 100644
> --- a/migration/options.c
> +++ b/migration/options.c
> @@ -266,7 +266,8 @@ bool migrate_multifd(void)
>  {
>      MigrationState *s = migrate_get_current();
>  
> -    return s->capabilities[MIGRATION_CAPABILITY_MULTIFD];
> +    return s->capabilities[MIGRATION_CAPABILITY_MULTIFD]
> +            && !migration_in_postcopy();
>  }

We need to keep this as-is.. I'm afraid.

You can always do proper check with multifd & !postcopy in your use cases.

>  
>  bool migrate_pause_before_switchover(void)
> @@ -479,11 +480,6 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, 
> Error **errp)
>              error_setg(errp, "Postcopy is not compatible with 
> ignore-shared");
>              return false;
>          }
> -
> -        if (new_caps[MIGRATION_CAPABILITY_MULTIFD]) {
> -            error_setg(errp, "Postcopy is not yet compatible with multifd");
> -            return false;
> -        }
>      }
>  
>      if (new_caps[MIGRATION_CAPABILITY_BACKGROUND_SNAPSHOT]) {
> -- 
> 2.47.0
> 

-- 
Peter Xu


Reply via email to