migration/colo.c: Flush ram cache only after receiving device state
commit24fa16f8cc374935458672b027829180ea4b4460
authorLukas Straub <lukasstraub2@web.de>
Mon, 11 May 2020 11:10:51 +0000 (11 13:10 +0200)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 1 Jun 2020 17:44:27 +0000 (1 18:44 +0100)
tree68f47253ba485939fc2a7e8e07cca501c4c5bc99
parent786d8b8e38b134f99556e08047e016563b7063f9
migration/colo.c: Flush ram cache only after receiving device state

If we suceed in receiving ram state, but fail receiving the device
state, there will be a mismatch between the two.

Fix this by flushing the ram cache only after the vmstate has been
received.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Message-Id: <3289d007d494cb0e2f05b1cf4ae6a78d300fede3.1589193382.git.lukasstraub2@web.de>
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/colo.c
migration/ram.c
migration/ram.h