diff mbox series

[PULL,09/11] migration: save_compress_page() can take block through pss

Message ID 20231018100651.32674-10-quintela@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/11] migration: RDMA is not compatible with anything else | expand

Commit Message

Juan Quintela Oct. 18, 2023, 10:06 a.m. UTC
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration/ram.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/migration/ram.c b/migration/ram.c
index 5595379fa6..378d310fbd 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2067,7 +2067,7 @@  static bool save_page_use_compression(RAMState *rs)
  * paths to handle it
  */
 static bool save_compress_page(RAMState *rs, PageSearchStatus *pss,
-                               RAMBlock *block, ram_addr_t offset)
+                               ram_addr_t offset)
 {
     if (!save_page_use_compression(rs)) {
         return false;
@@ -2083,12 +2083,13 @@  static bool save_compress_page(RAMState *rs, PageSearchStatus *pss,
      * We post the fist page as normal page as compression will take
      * much CPU resource.
      */
-    if (block != pss->last_sent_block) {
+    if (pss->block != pss->last_sent_block) {
         ram_flush_compressed_data(rs);
         return false;
     }
 
-    if (compress_page_with_multi_thread(block, offset, send_queued_data) > 0) {
+    if (compress_page_with_multi_thread(pss->block, offset,
+                                        send_queued_data) > 0) {
         return true;
     }
 
@@ -2114,7 +2115,7 @@  static int ram_save_target_page_legacy(RAMState *rs, PageSearchStatus *pss)
         return res;
     }
 
-    if (save_compress_page(rs, pss, block, offset)) {
+    if (save_compress_page(rs, pss, offset)) {
         return 1;
     }