mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
live migration: Propagate output monitor to callback handler
In order to allow proper progress reporting to the monitor that initiated the migration, forward the monitor reference through the migration layer down to SaveLiveStateHandler. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
82801d8f4f
commit
f327aa0c60
11 changed files with 73 additions and 59 deletions
|
@ -75,7 +75,8 @@ static void unix_wait_for_connect(void *opaque)
|
|||
}
|
||||
}
|
||||
|
||||
MigrationState *unix_start_outgoing_migration(const char *path,
|
||||
MigrationState *unix_start_outgoing_migration(Monitor *mon,
|
||||
const char *path,
|
||||
int64_t bandwidth_limit,
|
||||
int detach,
|
||||
int blk,
|
||||
|
@ -101,7 +102,7 @@ MigrationState *unix_start_outgoing_migration(const char *path,
|
|||
s->mig_state.shared = inc;
|
||||
|
||||
s->state = MIG_STATE_ACTIVE;
|
||||
s->mon_resume = NULL;
|
||||
s->mon = NULL;
|
||||
s->bandwidth_limit = bandwidth_limit;
|
||||
s->fd = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||
if (s->fd < 0) {
|
||||
|
@ -111,8 +112,9 @@ MigrationState *unix_start_outgoing_migration(const char *path,
|
|||
|
||||
socket_set_nonblock(s->fd);
|
||||
|
||||
if (!detach)
|
||||
migrate_fd_monitor_suspend(s);
|
||||
if (!detach) {
|
||||
migrate_fd_monitor_suspend(s, mon);
|
||||
}
|
||||
|
||||
do {
|
||||
ret = connect(s->fd, (struct sockaddr *)&addr, sizeof(addr));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue