From b22ff1fbed9d7f1f677804cbaa9ee03ca17d0013 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 17 Oct 2012 21:06:31 +0200 Subject: [PATCH] migration: Only go to the iterate stage if there is anything to send Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela Reviewed-by: Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini --- migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.11.0