"Dr. David Alan Gilbert" <dgilb...@redhat.com> wrote:
> * Juan Quintela (quint...@redhat.com) wrote:
>> Signed-off-by: Juan Quintela <quint...@redhat.com>
>> ---
>>  migration/ram.c | 30 ++++++++++++++++++++++++------
>>  1 file changed, 24 insertions(+), 6 deletions(-)
>> 
>> diff --git a/migration/ram.c b/migration/ram.c
>> index 862ec53d32..9adbaa81f9 100644
>> --- a/migration/ram.c
>> +++ b/migration/ram.c
>> @@ -625,9 +625,6 @@ static int multifd_recv_unfill_packet(MultiFDRecvParams 
>> *p, Error **errp)
>>      RAMBlock *block;
>>      int i;
>>  
>> -    /* ToDo: We can't use it until we haven't received a message */
>> -    return 0;
>> -
>>      be32_to_cpus(&packet->magic);
>>      if (packet->magic != MULTIFD_MAGIC) {
>>          error_setg(errp, "multifd: received packet "
>> @@ -851,6 +848,7 @@ static void *multifd_send_thread(void *opaque)
>>  {
>>      MultiFDSendParams *p = opaque;
>>      Error *local_err = NULL;
>> +    int ret;
>>  
>>      trace_multifd_send_thread_start(p->id);
>>  
>> @@ -878,10 +876,18 @@ static void *multifd_send_thread(void *opaque)
>>  
>>              trace_multifd_send(p->id, seq, used, flags);
>>  
>> -            /* ToDo: send packet here */
>> +            ret = qio_channel_write_all(p->c, (void *)p->packet,
>> +                                        p->packet_len, &local_err);
>> +            if (ret != 0) {
>> +                break;
>> +            }
>> +
>> +            ret = qio_channel_writev_all(p->c, p->pages->iov, used, 
>> &local_err);
>> +            if (ret != 0) {
>> +                break;
>> +            }
>>  
>>              qemu_mutex_lock(&p->mutex);
>> -            p->flags = 0;
>
> What's this change?

Leftover from previous approach on patch 16, we already do that
assignment several lines before.  Removed it on patch 16 as it should.

Thanks, Juan.

Reply via email to