aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yang <richardw.yang@linux.intel.com>2019-06-05 09:08:28 +0800
committerJuan Quintela <quintela@redhat.com>2019-07-15 15:39:02 +0200
commit422314e751ba071ca92152a544c0656882e5acde (patch)
treeb3a8b78f680f3b7ab2c0be09d0ae2d8670ced655
parent77568ea7f845cefc5623f7d7fb75137b5e30b956 (diff)
migration/ram.c: reset complete_round when we gets a queued page
In case we gets a queued page, the order of block is interrupted. We may not rely on the complete_round flag to say we have already searched the whole blocks on the list. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20190605010828.6969-1-richardw.yang@linux.intel.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r--migration/ram.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 96c84f770a..89eec7ee9d 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2286,6 +2286,12 @@ static bool get_queued_page(RAMState *rs, PageSearchStatus *pss)
*/
pss->block = block;
pss->page = offset >> TARGET_PAGE_BITS;
+
+ /*
+ * This unqueued page would break the "one round" check, even is
+ * really rare.
+ */
+ pss->complete_round = false;
}
return !!block;