mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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
This commit is contained in:
commit
016c718231
5 changed files with 83 additions and 93 deletions
12
savevm.c
12
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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue