aboutsummaryrefslogtreecommitdiff
path: root/migration/multifd-zstd.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2021-11-22 13:41:06 +0100
committerJuan Quintela <quintela@redhat.com>2022-01-28 15:38:23 +0100
commitcf2d4aa8a276f8540eef593141b7933487fa32b2 (patch)
tree5dd9412aedebb6515074f7934dd34794b7a6c6e3 /migration/multifd-zstd.c
parent815956f03902980c771da64b17f7f791c1cb57b0 (diff)
downloadqemu-cf2d4aa8a276f8540eef593141b7933487fa32b2.zip
qemu-cf2d4aa8a276f8540eef593141b7933487fa32b2.tar.gz
qemu-cf2d4aa8a276f8540eef593141b7933487fa32b2.tar.bz2
multifd: Use normal pages array on the recv side
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> --- Rename num_normal_pages to total_normal_pages (peter)
Diffstat (limited to 'migration/multifd-zstd.c')
-rw-r--r--migration/multifd-zstd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/migration/multifd-zstd.c b/migration/multifd-zstd.c
index 907d078..c5ed72d 100644
--- a/migration/multifd-zstd.c
+++ b/migration/multifd-zstd.c
@@ -242,7 +242,7 @@ static int zstd_recv_pages(MultiFDRecvParams *p, Error **errp)
uint32_t in_size = p->next_packet_size;
uint32_t out_size = 0;
size_t page_size = qemu_target_page_size();
- uint32_t expected_size = p->pages->num * page_size;
+ uint32_t expected_size = p->normal_num * page_size;
uint32_t flags = p->flags & MULTIFD_FLAG_COMPRESSION_MASK;
struct zstd_data *z = p->data;
int ret;
@@ -263,8 +263,8 @@ static int zstd_recv_pages(MultiFDRecvParams *p, Error **errp)
z->in.size = in_size;
z->in.pos = 0;
- for (i = 0; i < p->pages->num; i++) {
- z->out.dst = p->pages->block->host + p->pages->offset[i];
+ for (i = 0; i < p->normal_num; i++) {
+ z->out.dst = p->pages->block->host + p->normal[i];
z->out.size = page_size;
z->out.pos = 0;