From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwD7J-0005oS-D3 for qemu-devel@nongnu.org; Sat, 23 May 2015 13:21:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwD7F-00059J-F6 for qemu-devel@nongnu.org; Sat, 23 May 2015 13:21:45 -0400 Message-ID: <5560B718.4070400@redhat.com> Date: Sat, 23 May 2015 19:21:28 +0200 From: Max Reitz MIME-Version: 1.0 References: <1432190583-10518-1-git-send-email-famz@redhat.com> <1432190583-10518-14-git-send-email-famz@redhat.com> In-Reply-To: <1432190583-10518-14-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 13/13] block/mirror: Block "device IO" during mirror exit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, jcody@redhat.com, armbru@redhat.com, Stefan Hajnoczi , amit.shah@redhat.com, pbonzini@redhat.com On 21.05.2015 08:43, Fam Zheng wrote: > When mirror should complete, the source and target are in sync. But we > call bdrv_swap() only a while later in the main loop bh. If the guest > writes something before that, target will not get the new data. > > Block "device IO" before bdrv_drain and unblock it after bdrw_swap(). > > Reported-by: Wen Congyang > Signed-off-by: Fam Zheng > --- > block/mirror.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz