mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
migration: fix the multifd code when receiving less channels
In our current code, when multifd is used during migration, if there is an error before the destination receives all new channels, the source keeps running, however the destination does not exit but keeps waiting until the source is killed deliberately. Fix this by dumping the specific error and let users decide whether to quit from the destination side when failing to receive packet via some channel. And update the comment for multifd_recv_new_channel(). Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Peter Xu <peterx@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Fei Li <fli@suse.com> Reviewed-by: Peter Xu <peterx@redhat.com> Message-Id: <20190113140849.38339-3-lifei1214@126.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
78524330fd
commit
49ed0d24a4
5 changed files with 29 additions and 12 deletions
|
@ -541,7 +541,7 @@ void migration_fd_process_incoming(QEMUFile *f)
|
|||
migration_incoming_process();
|
||||
}
|
||||
|
||||
void migration_ioc_process_incoming(QIOChannel *ioc)
|
||||
void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)
|
||||
{
|
||||
MigrationIncomingState *mis = migration_incoming_get_current();
|
||||
bool start_migration;
|
||||
|
@ -563,9 +563,14 @@ void migration_ioc_process_incoming(QIOChannel *ioc)
|
|||
*/
|
||||
start_migration = !migrate_use_multifd();
|
||||
} else {
|
||||
Error *local_err = NULL;
|
||||
/* Multiple connections */
|
||||
assert(migrate_use_multifd());
|
||||
start_migration = multifd_recv_new_channel(ioc);
|
||||
start_migration = multifd_recv_new_channel(ioc, &local_err);
|
||||
if (local_err) {
|
||||
error_propagate(errp, local_err);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (start_migration) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue