diff options
author | lirans@il.ibm.com <lirans@il.ibm.com> | 2009-11-02 15:40:58 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-11-17 08:49:30 -0600 |
commit | c163b5cae98be8eda675b96e2dec4707bfa7fbbf (patch) | |
tree | 7c50d7a326b72c6aa1906e4055ecf049d667fad1 /buffered_file.c | |
parent | 7cd1e32a860895ccca89eb90a0226efbcd969b55 (diff) | |
download | qemu-c163b5cae98be8eda675b96e2dec4707bfa7fbbf.zip qemu-c163b5cae98be8eda675b96e2dec4707bfa7fbbf.tar.gz qemu-c163b5cae98be8eda675b96e2dec4707bfa7fbbf.tar.bz2 |
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 'buffered_file.c')
-rw-r--r-- | buffered_file.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/buffered_file.c b/buffered_file.c index 56b4418..217f75e 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -211,6 +211,13 @@ out: return s->xfer_limit; } +static size_t buffered_get_rate_limit(void *opaque) +{ + QEMUFileBuffered *s = opaque; + + return s->xfer_limit; +} + static void buffered_rate_tick(void *opaque) { QEMUFileBuffered *s = opaque; @@ -251,7 +258,8 @@ QEMUFile *qemu_fopen_ops_buffered(void *opaque, s->file = qemu_fopen_ops(s, buffered_put_buffer, NULL, buffered_close, buffered_rate_limit, - buffered_set_rate_limit); + buffered_set_rate_limit, + buffered_get_rate_limit); s->timer = qemu_new_timer(rt_clock, buffered_rate_tick, s); |