]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
migration: Export send_queued_data()
authorJuan Quintela <quintela@redhat.com>
Thu, 19 Oct 2023 11:07:21 +0000 (13:07 +0200)
committerJuan Quintela <quintela@redhat.com>
Mon, 30 Oct 2023 16:41:55 +0000 (17:41 +0100)
This function is only used for compression.  So we rename it as
compress_send_queued_data().  We put it on ram-compress.h because we
are moving it later to ram-compress.c.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231019110724.15324-9-quintela@redhat.com>

migration/ram-compress.h
migration/ram.c

index 76dacd3ec73a97baa49b84688ebdb7ac329c7b38..636281ed97e9ff4df4310c5087ff0eb667bfa22b 100644 (file)
@@ -72,5 +72,6 @@ void populate_compress(MigrationInfo *info);
 uint64_t ram_compressed_pages(void);
 void update_compress_thread_counts(const CompressParam *param, int bytes_xmit);
 void compress_update_rates(uint64_t page_count);
+int compress_send_queued_data(CompressParam *param);
 
 #endif
index f7daf2226e7eea7c8d61fe5533d4a2ba489e5037..b6d485358ea9fa4a2b2699c1f0dc7bc67bd7dcb5 100644 (file)
@@ -1264,7 +1264,7 @@ static int ram_save_multifd_page(QEMUFile *file, RAMBlock *block,
     return 1;
 }
 
-static int send_queued_data(CompressParam *param)
+int compress_send_queued_data(CompressParam *param)
 {
     PageSearchStatus *pss = &ram_state->pss[RAM_CHANNEL_PRECOPY];
     MigrationState *ms = migrate_get_current();
@@ -1306,7 +1306,7 @@ static void ram_flush_compressed_data(void)
         return;
     }
 
-    flush_compressed_data(send_queued_data);
+    flush_compressed_data(compress_send_queued_data);
 }
 
 #define PAGE_ALL_CLEAN 0
@@ -2041,7 +2041,7 @@ static bool save_compress_page(RAMState *rs, PageSearchStatus *pss,
     }
 
     return compress_page_with_multi_thread(pss->block, offset,
-                                           send_queued_data);
+                                           compress_send_queued_data);
 }
 
 /**