diff options
author | Juan Quintela <quintela@redhat.com> | 2023-06-13 13:34:12 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-10-18 10:39:03 +0200 |
commit | d637a182b98a082bf0b9cd1853fe3192c7ea88e8 (patch) | |
tree | 62f3f6ef0705553de44f3f9afa2b9035ed294f6e | |
parent | 17cd011d06ba91eb8f8f1ba97d0b1be6effcad41 (diff) | |
download | qemu-d637a182b98a082bf0b9cd1853fe3192c7ea88e8.zip qemu-d637a182b98a082bf0b9cd1853fe3192c7ea88e8.tar.gz qemu-d637a182b98a082bf0b9cd1853fe3192c7ea88e8.tar.bz2 |
migration: save_compress_page() can take block through pss
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r-- | migration/ram.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/migration/ram.c b/migration/ram.c index 5595379..378d310 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; } |