We only enter colo state after the precopy migration is finished so this if is always taken.
Reviewed-by: Fabiano Rosas <[email protected]> Signed-off-by: Lukas Straub <[email protected]> --- migration/ram.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index aebf77aa0b861e00516d6f1090aebefdd0d97e54..979751f61b30d6c4b878866b5011507e7c519176 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3116,12 +3116,12 @@ static int ram_save_setup(QEMUFile *f, void *opaque, Error **errp) RAMBlock *block; int ret, max_hg_page_size; - /* migration has already setup the bitmap, reuse it. */ - if (!migration_in_colo_state()) { - if (ram_init_all(rsp, errp) != 0) { - return -1; - } + assert(!migration_in_colo_state()); + + if (ram_init_all(rsp, errp) != 0) { + return -1; } + (*rsp)->pss[RAM_CHANNEL_PRECOPY].pss_channel = f; /* -- 2.39.5
