From f327aa0c608b4bae3c93f0fbd0afcfdd9c9635bc Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 30 Nov 2009 18:21:21 +0100 Subject: 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 Signed-off-by: Anthony Liguori --- migration-exec.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'migration-exec.c') diff --git a/migration-exec.c b/migration-exec.c index c83066959a..87f645b68c 100644 --- a/migration-exec.c +++ b/migration-exec.c @@ -52,7 +52,8 @@ static int exec_close(FdMigrationState *s) return 0; } -MigrationState *exec_start_outgoing_migration(const char *command, +MigrationState *exec_start_outgoing_migration(Monitor *mon, + const char *command, int64_t bandwidth_limit, int detach, int blk, @@ -88,13 +89,14 @@ MigrationState *exec_start_outgoing_migration(const char *command, s->mig_state.blk = blk; s->mig_state.shared = inc; - + s->state = MIG_STATE_ACTIVE; - s->mon_resume = NULL; + s->mon = NULL; s->bandwidth_limit = bandwidth_limit; - if (!detach) - migrate_fd_monitor_suspend(s); + if (!detach) { + migrate_fd_monitor_suspend(s, mon); + } migrate_fd_connect(s); return &s->mig_state; -- cgit v1.2.1