提交 2c5a7f20 编写于 作者: S Stefan Hajnoczi 提交者: Anthony Liguori

block-migration: fix block_save_iterate() return value

The .save_live_iterate() function returns 0 to continue iterating or 1
to stop iterating.

Since 16310a3c it only ever returns 0,
leading to an infinite loop.

Return 1 if we have finished sending dirty blocks.
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
Message-id: 1360534366-26723-4-git-send-email-stefanha@redhat.com
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 9ee0cb20
...@@ -582,7 +582,12 @@ static int block_save_iterate(QEMUFile *f, void *opaque) ...@@ -582,7 +582,12 @@ static int block_save_iterate(QEMUFile *f, void *opaque)
qemu_put_be64(f, BLK_MIG_FLAG_EOS); qemu_put_be64(f, BLK_MIG_FLAG_EOS);
return 0; /* Complete when bulk transfer is done and all dirty blocks have been
* transferred.
*/
return block_mig_state.bulk_completed &&
block_mig_state.submitted == 0 &&
block_mig_state.read_done == 0;
} }
static int block_save_complete(QEMUFile *f, void *opaque) static int block_save_complete(QEMUFile *f, void *opaque)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册