aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-10-17 21:06:31 +0200
committerJuan Quintela <quintela@redhat.com>2013-01-17 13:54:52 +0100
commitb22ff1fbed9d7f1f677804cbaa9ee03ca17d0013 (patch)
treeef97f5ffa1bf1caa656711d0f47d60e74b89a3b5 /migration.c
parentc369f40d2cb39f4eaaf6589c1113b528256d3a09 (diff)
migration: Only go to the iterate stage if there is anything to send
Signed-off-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration.c b/migration.c
index 6d3aeeda51..fe1a103abe 100644
--- a/migration.c
+++ b/migration.c
@@ -698,7 +698,7 @@ static void *buffered_file_thread(void *opaque)
DPRINTF("iterate\n");
pending_size = qemu_savevm_state_pending(s->file, max_size);
DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
- if (pending_size >= max_size) {
+ if (pending_size && pending_size >= max_size) {
ret = qemu_savevm_state_iterate(s->file);
if (ret < 0) {
qemu_mutex_unlock_iothread();