aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-01-21 13:22:43 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-21 13:22:43 -0600
commit016c7182315b1f842ac351fae86041d2c8fe4596 (patch)
treeffbf5a20726ed68d5beaba6b19627acdf778492c /savevm.c
parente0f01837e104517c7c511c79bb93c8792b7263e5 (diff)
parent6522773f88a2e37800f0bf7dc3632a14649f53c6 (diff)
downloadqemu-016c7182315b1f842ac351fae86041d2c8fe4596.zip
qemu-016c7182315b1f842ac351fae86041d2c8fe4596.tar.gz
qemu-016c7182315b1f842ac351fae86041d2c8fe4596.tar.bz2
Merge remote-tracking branch 'quintela/thread.next' into staging
# By Juan Quintela (7) and Paolo Bonzini (6) # Via Juan Quintela * quintela/thread.next: migration: remove argument to qemu_savevm_state_cancel migration: Only go to the iterate stage if there is anything to send migration: unfold rest of migrate_fd_put_ready() into thread migration: move exit condition to migration thread migration: Add buffered_flush error handling migration: move beginning stage to the migration thread qemu-file: Only set last_error if it is not already set migration: fix off-by-one in buffered_rate_limit migration: remove double call to migrate_fd_close migration: make function static use XFER_LIMIT_RATIO consistently Protect migration_bitmap_sync() with the ramlist lock Unlock ramlist lock also in error case
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/savevm.c b/savevm.c
index d9ff1d9..304d1ef 100644
--- a/savevm.c
+++ b/savevm.c
@@ -419,7 +419,9 @@ int qemu_file_get_error(QEMUFile *f)
static void qemu_file_set_error(QEMUFile *f, int ret)
{
- f->last_error = ret;
+ if (f->last_error == 0) {
+ f->last_error = ret;
+ }
}
/** Flushes QEMUFile buffer
@@ -1588,13 +1590,13 @@ int qemu_savevm_state_begin(QEMUFile *f,
ret = se->ops->save_live_setup(f, se->opaque);
if (ret < 0) {
- qemu_savevm_state_cancel(f);
+ qemu_savevm_state_cancel();
return ret;
}
}
ret = qemu_file_get_error(f);
if (ret != 0) {
- qemu_savevm_state_cancel(f);
+ qemu_savevm_state_cancel();
}
return ret;
@@ -1645,7 +1647,7 @@ int qemu_savevm_state_iterate(QEMUFile *f)
}
ret = qemu_file_get_error(f);
if (ret != 0) {
- qemu_savevm_state_cancel(f);
+ qemu_savevm_state_cancel();
}
return ret;
}
@@ -1725,7 +1727,7 @@ uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)
return ret;
}
-void qemu_savevm_state_cancel(QEMUFile *f)
+void qemu_savevm_state_cancel(void)
{
SaveStateEntry *se;