mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
multifd: Make zstd use iov's
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
48a4a44c1c
commit
0a818b89eb
@ -154,6 +154,9 @@ static int zstd_send_prepare(MultiFDSendParams *p, Error **errp)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
p->iov[p->iovs_num].iov_base = z->zbuff;
|
||||
p->iov[p->iovs_num].iov_len = z->out.pos;
|
||||
p->iovs_num++;
|
||||
p->next_packet_size = z->out.pos;
|
||||
p->flags |= MULTIFD_FLAG_ZSTD;
|
||||
|
||||
@ -173,10 +176,7 @@ static int zstd_send_prepare(MultiFDSendParams *p, Error **errp)
|
||||
*/
|
||||
static int zstd_send_write(MultiFDSendParams *p, uint32_t used, Error **errp)
|
||||
{
|
||||
struct zstd_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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user