"Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
> * Juan Quintela (quintela@redhat.com) wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>> migration/multifd-zlib.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c
>> index da6201704c..478a4af115 100644
>> --- a/migration/multifd-zlib.c
>> +++ b/migration/multifd-zlib.c
>> @@ -143,6 +143,9 @@ static int zlib_send_prepare(MultiFDSendParams *p, Error **errp)
>> }
>> out_size += available - zs->avail_out;
>> }
>> + p->iov[p->iovs_num].iov_base = z->zbuff;
>> + p->iov[p->iovs_num].iov_len = out_size;
>> + p->iovs_num++;
>> p->next_packet_size = out_size;
>
> Do you still need next_packet_size?
As my crystal ball didn't worked so well, I ended putting
next_packet_size on the wire. So yes, I need it.
Yes, I also wanted to remove it.
Later, Juan.
>
> but:
>
>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>
>> p->flags |= MULTIFD_FLAG_ZLIB;
>>
>> @@ -162,10 +165,7 @@ static int zlib_send_prepare(MultiFDSendParams *p, Error **errp)
>> */
>> static int zlib_send_write(MultiFDSendParams *p, uint32_t used, Error **errp)
>> {
>> - struct zlib_data *z = p->data;
>> -
>> - return qio_channel_write_all(p->c, (void *)z->zbuff, p->next_packet_size,
>> - errp);
>> + return qio_channel_writev_all(p->c, p->iov, p->iovs_num, errp);
>> }
>>
>> /**
>> --
>> 2.33.1
>>