diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2009-11-30 18:21:21 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 10:48:53 -0600 |
commit | 0e37a682cdf327f6975024f3e8ccc64140be052c (patch) | |
tree | c8a24861d58587a3b2107cb22fda348b2d746e00 /migration-tcp.c | |
parent | 5a76ef92ef7fa3c3d3c21bc98d1da05a7fab95de (diff) | |
download | qemu-0e37a682cdf327f6975024f3e8ccc64140be052c.tar.gz qemu-0e37a682cdf327f6975024f3e8ccc64140be052c.tar.bz2 qemu-0e37a682cdf327f6975024f3e8ccc64140be052c.zip |
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>
Diffstat (limited to 'migration-tcp.c')
-rw-r--r-- | migration-tcp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/migration-tcp.c b/migration-tcp.c index efa7c74c67..b77ed87621 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@ -76,7 +76,8 @@ static void tcp_wait_for_connect(void *opaque) } } -MigrationState *tcp_start_outgoing_migration(const char *host_port, +MigrationState *tcp_start_outgoing_migration(Monitor *mon, + const char *host_port, int64_t bandwidth_limit, int detach, int blk, @@ -102,7 +103,7 @@ MigrationState *tcp_start_outgoing_migration(const char *host_port, 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_INET, SOCK_STREAM, 0); if (s->fd == -1) { @@ -112,8 +113,9 @@ MigrationState *tcp_start_outgoing_migration(const char *host_port, 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)); |