]> git.proxmox.com Git - qemu.git/commitdiff
Revert "migration: do not sent zero pages in bulk stage"
authorPeter Lieven <pl@kamp.de>
Mon, 10 Jun 2013 10:14:19 +0000 (12:14 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 12 Aug 2013 22:15:51 +0000 (17:15 -0500)
Not sending zero pages breaks migration if a page is zero
at the source but not at the destination. This can e.g. happen
if different BIOS versions are used at source and destination.
It has also been reported that migration on pseries is completely
broken with this patch.

This effectively reverts commit f1c72795af573b24a7da5eb52375c9aba8a37972.

Conflicts:

arch_init.c

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit 9ef051e5536b6368a1076046ec6c4ec4ac12b5c6)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
arch_init.c

index 522caeb61cf57194598129b43c6286d6fa92d285..6afc57e04ca12b792217ba9b73d61f9de9e2c707 100644 (file)
@@ -457,15 +457,10 @@ static int ram_save_block(QEMUFile *f, bool last_stage)
             bytes_sent = -1;
             if (is_zero_page(p)) {
                 acct_info.dup_pages++;
-                if (!ram_bulk_stage) {
-                    bytes_sent = save_block_hdr(f, block, offset, cont,
-                                                RAM_SAVE_FLAG_COMPRESS);
-                    qemu_put_byte(f, 0);
-                    bytes_sent++;
-                } else {
-                    acct_info.skipped_pages++;
-                    bytes_sent = 0;
-                }
+                bytes_sent = save_block_hdr(f, block, offset, cont,
+                                            RAM_SAVE_FLAG_COMPRESS);
+                qemu_put_byte(f, 0);
+                bytes_sent++;
             } else if (!ram_bulk_stage && migrate_use_xbzrle()) {
                 current_addr = block->offset + offset;
                 bytes_sent = save_xbzrle_page(f, p, current_addr, block,