mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-02 22:41:07 +00:00
migration: update recv bitmap only on dest vm
We shouldn't update the received bitmap if we're the source VM. This fixes a breakage when release-ram is enabled on postcopy. Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180723123305.24792-2-peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
67fa1f5700
commit
814bb08f17
1 changed files with 9 additions and 2 deletions
|
@ -2827,8 +2827,15 @@ int ram_discard_range(const char *rbname, uint64_t start, size_t length)
|
|||
goto err;
|
||||
}
|
||||
|
||||
bitmap_clear(rb->receivedmap, start >> qemu_target_page_bits(),
|
||||
length >> qemu_target_page_bits());
|
||||
/*
|
||||
* On source VM, we don't need to update the received bitmap since
|
||||
* we don't even have one.
|
||||
*/
|
||||
if (rb->receivedmap) {
|
||||
bitmap_clear(rb->receivedmap, start >> qemu_target_page_bits(),
|
||||
length >> qemu_target_page_bits());
|
||||
}
|
||||
|
||||
ret = ram_block_discard_range(rb, start, length);
|
||||
|
||||
err:
|
||||
|
|
Loading…
Reference in a new issue