From c163b5cae98be8eda675b96e2dec4707bfa7fbbf Mon Sep 17 00:00:00 2001 From: "lirans@il.ibm.com" Date: Mon, 2 Nov 2009 15:40:58 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- migration-fd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'migration-fd.c') diff --git a/migration-fd.c b/migration-fd.c index 15b44158ff..587f9d8e84 100644 --- a/migration-fd.c +++ b/migration-fd.c @@ -54,7 +54,9 @@ static int fd_close(FdMigrationState *s) MigrationState *fd_start_outgoing_migration(Monitor *mon, const char *fdname, int64_t bandwidth_limit, - int detach) + int detach, + int blk, + int inc) { FdMigrationState *s; @@ -78,6 +80,9 @@ MigrationState *fd_start_outgoing_migration(Monitor *mon, 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; -- cgit v1.2.1