diff options
author | Juan Quintela <quintela@redhat.com> | 2021-11-19 15:05:23 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2022-01-28 15:38:23 +0100 |
commit | 0a818b89eb8eaf79ae651405907d8110a0935cfd (patch) | |
tree | 33e082f368d36ada922e4a6da9c854d2e2cc5cf7 /migration/multifd-zstd.c | |
parent | 48a4a44c1cde382c6b8e7792d01fe7d9b0a59c69 (diff) | |
download | qemu-0a818b89eb8eaf79ae651405907d8110a0935cfd.zip qemu-0a818b89eb8eaf79ae651405907d8110a0935cfd.tar.gz qemu-0a818b89eb8eaf79ae651405907d8110a0935cfd.tar.bz2 |
multifd: Make zstd 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-zstd.c')
-rw-r--r-- | migration/multifd-zstd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/migration/multifd-zstd.c b/migration/multifd-zstd.c index 97c0836..bd393ae 100644 --- a/migration/multifd-zstd.c +++ b/migration/multifd-zstd.c @@ -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); } /** |