mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 22:33:36 +08:00
c163b5cae9
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>
30 lines
610 B
C
30 lines
610 B
C
/*
|
|
* QEMU live block migration
|
|
*
|
|
* Copyright IBM, Corp. 2009
|
|
*
|
|
* Authors:
|
|
* Liran Schour <lirans@il.ibm.com>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2. See
|
|
* the COPYING file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef BLOCK_MIGRATION_H
|
|
#define BLOCK_MIGRATION_H
|
|
|
|
typedef struct BlkMigDevState {
|
|
BlockDriverState *bs;
|
|
int bulk_completed;
|
|
int shared_base;
|
|
struct BlkMigDevState *next;
|
|
int64_t cur_sector;
|
|
int64_t total_sectors;
|
|
int64_t dirty;
|
|
} BlkMigDevState;
|
|
|
|
void blk_mig_init(void);
|
|
void blk_mig_info(void);
|
|
#endif /* BLOCK_MIGRATION_H */
|