diff options
author | Juan Quintela <quintela@redhat.com> | 2021-11-22 13:41:06 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2022-01-28 15:38:23 +0100 |
commit | cf2d4aa8a276f8540eef593141b7933487fa32b2 (patch) | |
tree | 5dd9412aedebb6515074f7934dd34794b7a6c6e3 /migration/multifd-zlib.c | |
parent | 815956f03902980c771da64b17f7f791c1cb57b0 (diff) |
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-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 7f4fbef2c9..8239c840d3 100644 --- a/migration/multifd-zlib.c +++ b/migration/multifd-zlib.c @@ -225,7 +225,7 @@ static int zlib_recv_pages(MultiFDRecvParams *p, Error **errp) uint32_t in_size = p->next_packet_size; /* we measure the change of total_out */ uint32_t out_size = zs->total_out; - uint32_t expected_size = p->pages->num * qemu_target_page_size(); + uint32_t expected_size = p->normal_num * page_size; uint32_t flags = p->flags & MULTIFD_FLAG_COMPRESSION_MASK; int ret; int i; @@ -244,16 +244,16 @@ static int zlib_recv_pages(MultiFDRecvParams *p, Error **errp) zs->avail_in = in_size; zs->next_in = z->zbuff; - for (i = 0; i < p->pages->num; i++) { + for (i = 0; i < p->normal_num; i++) { int flush = Z_NO_FLUSH; unsigned long start = zs->total_out; - if (i == p->pages->num - 1) { + if (i == p->normal_num - 1) { flush = Z_SYNC_FLUSH; } zs->avail_out = page_size; - zs->next_out = p->pages->block->host + p->pages->offset[i]; + zs->next_out = p->pages->block->host + p->normal[i]; /* * Welcome to inflate semantics |