summaryrefslogtreecommitdiffstats
path: root/migration
diff options
context:
space:
mode:
authorWei Yang2019-07-09 16:09:22 +0200
committerDr. David Alan Gilbert2019-08-14 18:33:14 +0200
commit4e455d51efcccc058a359ab77fa7ef5e21a4957f (patch)
treece7beef9c7a928e262d140143bae5f615acbc935 /migration
parentmigration/postcopy: do_fixup is true when host_offset is non-zero (diff)
downloadqemu-4e455d51efcccc058a359ab77fa7ef5e21a4957f.tar.gz
qemu-4e455d51efcccc058a359ab77fa7ef5e21a4957f.tar.xz
qemu-4e455d51efcccc058a359ab77fa7ef5e21a4957f.zip
migration/savevm: flush file for iterable_only case
It would be proper to flush file even for iterable_only case. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Message-Id: <20190709140924.13291-2-richardw.yang@linux.intel.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/savevm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index a2a5f89b75..0bfdceefcc 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1292,7 +1292,7 @@ int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only,
}
if (iterable_only) {
- return 0;
+ goto flush;
}
vmdesc = qjson_new();
@@ -1353,6 +1353,7 @@ int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only,
}
qjson_destroy(vmdesc);
+flush:
qemu_fflush(f);
return 0;
}