On Thu, Jun 13, 2024 at 02:21:04PM -0300, Fabiano Rosas wrote:
> >> > @@ -3666,7 +3716,7 @@ void migrate_fd_connect(MigrationState *s, Error 
> >> > *error_in)
> >> >  {
> >> >      Error *local_err = NULL;
> >> >      uint64_t rate_limit;
> >> > -    bool resume = s->state == MIGRATION_STATUS_POSTCOPY_PAUSED;
> >> > +    bool resume = migration_in_postcopy();
> >> 
> >> Here you're expecting just PAUSED or RECOVER_SETUP, right? We'll not
> >> reach here in any of the other postcopy states.
> >
> > I think here it must be RECOVER_SETUP after this patch.  I changed it to
> > use the helper as I think that's cleaner (precopy doesn't allow resume),
> > and we don't need such change if the state machine trivially changes again.
> >
> 
> Intent matters for anyone reading the code in the future. I would use
> the state explicitly, but I don't have a strong opinion, feel free to
> ignore.

Neither do I; let me switch back then if it helps in some form.

-- 
Peter Xu


Reply via email to