aboutsummaryrefslogtreecommitdiffstats
path: root/migration-exec.c
diff options
context:
space:
mode:
authorlirans@il.ibm.com <lirans@il.ibm.com>2009-11-02 15:40:58 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-11-17 08:49:30 -0600
commitc163b5cae98be8eda675b96e2dec4707bfa7fbbf (patch)
tree7c50d7a326b72c6aa1906e4055ecf049d667fad1 /migration-exec.c
parent7cd1e32a860895ccca89eb90a0226efbcd969b55 (diff)
Block live migration
This patch introduces block migration called during live migration. Block are being copied to the destination in an async way. First the code will transfer the whole disk and then transfer all dirty blocks accumulted during the migration. Still need to improve transition from the iterative phase of migration to the end phase. For now transition will take place when all blocks transfered once, all the dirty blocks will be transfered during the end phase (guest is suspended). Changes from v4: - Global variabels moved to a global state structure allocated dynamically. - Minor coding style issues. - Poll block.c for tracking of dirty blocks instead of manage it here. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration-exec.c')
-rw-r--r--migration-exec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/migration-exec.c b/migration-exec.c
index b45c83385..c83066959 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -53,8 +53,10 @@ static int exec_close(FdMigrationState *s)
}
MigrationState *exec_start_outgoing_migration(const char *command,
- int64_t bandwidth_limit,
- int detach)
+ int64_t bandwidth_limit,
+ int detach,
+ int blk,
+ int inc)
{
FdMigrationState *s;
FILE *f;
@@ -84,6 +86,9 @@ MigrationState *exec_start_outgoing_migration(const char *command,
s->mig_state.get_status = migrate_fd_get_status;
s->mig_state.release = migrate_fd_release;
+ s->mig_state.blk = blk;
+ s->mig_state.shared = inc;
+
s->state = MIG_STATE_ACTIVE;
s->mon_resume = NULL;
s->bandwidth_limit = bandwidth_limit;