diff options
author | Juan Quintela <quintela@redhat.com> | 2021-11-19 15:03:02 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2022-01-28 15:38:23 +0100 |
commit | 48a4a44c1cde382c6b8e7792d01fe7d9b0a59c69 (patch) | |
tree | 1664399500812bd4b00ad83b50ce54f914c0700f /migration/multifd-zlib.c | |
parent | 226468ba3dea950ab4bb0b729878dde25812da1c (diff) | |
download | qemu-48a4a44c1cde382c6b8e7792d01fe7d9b0a59c69.zip qemu-48a4a44c1cde382c6b8e7792d01fe7d9b0a59c69.tar.gz qemu-48a4a44c1cde382c6b8e7792d01fe7d9b0a59c69.tar.bz2 |
multifd: Make zlib use iov's
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/multifd-zlib.c')
-rw-r--r-- | migration/multifd-zlib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c index a2fec4d..71480c8 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; 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); } /** |