Skip to content

Commit

Permalink
migration/ram.c: reset complete_round when we gets a queued page
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yang authored and Juan Quintela committed Jul 15, 2019
1 parent 77568ea commit 422314e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions migration/ram.c
Expand Up @@ -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;
Expand Down

0 comments on commit 422314e

Please sign in to comment.