Prasad Pandit <ppandit@redhat.com> writes:
> On Fri, 9 Jan 2026 at 18:11, Fabiano Rosas <farosas@suse.de> wrote:
>> When the incoming migration fails during the channel connection phase,
>> the state transition to FAILED is currently being done in the
>> MigrationState->state, but the MigrationIncomingState->state is the
>> one that should be used.
>>
>> Reviewed-by: Peter Xu <peterx@redhat.com>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>> migration/channel.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/migration/channel.c b/migration/channel.c
>> index 92435fa7f7..4768c71455 100644
>> --- a/migration/channel.c
>> +++ b/migration/channel.c
>> @@ -48,7 +48,7 @@ void migration_channel_process_incoming(QIOChannel *ioc)
>>
>> if (local_err) {
>> error_report_err(local_err);
>> - migrate_set_state(&s->state, s->state, MIGRATION_STATUS_FAILED);
>> + migrate_set_state(&mis->state, mis->state, MIGRATION_STATUS_FAILED);
>> if (mis->exit_on_error) {
>> exit(EXIT_FAILURE);
>> }
>
> * Change looks okay. (/me makes a note to see if we could combine
> MigrationState and MigrationIncomingState, why couldn't we use the
> same struct/object on both source and destination sides?).
>
The entire structs are a bit big for them to be duplicated. We could
certainly combine individual fields where it makes sense, or extract
some fields into their own structures that only get used in local
contexts. Work to be done.
> Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
>
> Thank you.
> ---
> - Prasad