Peter Xu <pet...@redhat.com> wrote:
> On Tue, Aug 08, 2017 at 06:26:11PM +0200, Juan Quintela wrote:
>
> [...]
>
>>  void migration_fd_process_incoming(QEMUFile *f)
>>  {
>> -    Coroutine *co = qemu_coroutine_create(process_incoming_migration_co, f);
>> -
>> +    Coroutine *co = qemu_coroutine_create(process_incoming_migration_co, 
>> NULL);
>> +    MigrationIncomingState *mis = migration_incoming_get_current();
>> +    
>> +    if (!mis->from_src_file) {
>> +        mis->from_src_file = f;
>
> [1]
>
>> +    }
>>      qemu_file_set_blocking(f, false);
>>      qemu_coroutine_enter(co);
>>  }
>>  
>> +void migration_ioc_process_incoming(QIOChannel *ioc)
>> +{
>> +    MigrationIncomingState *mis = migration_incoming_get_current();
>> +
>> +    if (!mis->from_src_file) {
>> +        QEMUFile *f = qemu_fopen_channel_input(ioc);
>> +        mis->from_src_file = f;
>
> Remove this line? Since migration_fd_process_incoming() will set it up
> as well below at [1].
>
> Then we can make sure there will be only one place to setup
> from_src_file.

This can be end being called from rdma code.

Yes, I know it is a mess.

Later, Juan.

Reply via email to