block/mirror: Sleep periodically during bitmap scanning
commit4c0cbd6fec7db182a6deb52d5a8a8e7b0c5cbe64
authorFam Zheng <famz@redhat.com>
Wed, 13 May 2015 03:11:13 +0000 (13 11:11 +0800)
committerJeff Cody <jcody@redhat.com>
Wed, 15 Jul 2015 01:50:13 +0000 (14 21:50 -0400)
tree3de841e56908fdc5aa3481ad2fc20d62db85d769
parent661725da09f47eb92d356fac10a4cf3b7ad1f61d
block/mirror: Sleep periodically during bitmap scanning

Before, we only yield after initializing dirty bitmap, where the QMP
command would return. That may take very long, and guest IO will be
blocked.

Add sleep points like the later mirror iterations.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1431486673-19280-1-git-send-email-famz@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/mirror.c