summaryrefslogtreecommitdiffstats
path: root/migration
diff options
context:
space:
mode:
authorDr. David Alan Gilbert2017-07-17 13:09:32 +0200
committerJuan Quintela2017-07-18 17:36:15 +0200
commit3a0f2ceaedcf70ff79b671f7fb3b7ec8e71f6e1e (patch)
tree8b8e0bc56381cc6be03d29ecebdac83cbca5df2b /migration
parentmigration/rdma: Fix race on source (diff)
downloadqemu-3a0f2ceaedcf70ff79b671f7fb3b7ec8e71f6e1e.tar.gz
qemu-3a0f2ceaedcf70ff79b671f7fb3b7ec8e71f6e1e.tar.xz
qemu-3a0f2ceaedcf70ff79b671f7fb3b7ec8e71f6e1e.zip
migration: Close file on failed migration load
Closing the file before exit on a failure allows the source to cleanup better, especially with RDMA. Partial fix for https://bugs.launchpad.net/qemu/+bug/1545052 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20170717110936.23314-3-dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c
index a0db40d364..8552f54ab4 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -348,6 +348,7 @@ static void process_incoming_migration_co(void *opaque)
migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE,
MIGRATION_STATUS_FAILED);
error_report("load of migration failed: %s", strerror(-ret));
+ qemu_fclose(mis->from_src_file);
exit(EXIT_FAILURE);
}
mis->bh = qemu_bh_new(process_incoming_migration_bh, mis);