qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 13/13] block/mirror: Block "device IO" during


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v4 13/13] block/mirror: Block "device IO" during mirror exit
Date: Tue, 19 May 2015 18:37:52 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, 05/19 10:49, Paolo Bonzini wrote:
> 
> 
> On 19/05/2015 18:48, Fam Zheng wrote:
> >> > 
> >> > This is too late.  As a rule, the blocker must be established before
> >> > calling bdrv_drain, and removed on the next yield (in this case, before
> >> > the assignment to last_pause_ns).
> > I don't understand. If the blocker is removed before mirror_run returns,
> > wouldn't more device IO already hit source image by the time mirror_exit 
> > runs?
> 
> If you go to mirror_exit, you won't reach the assignment (so you have to
> remove the blocker in mirror_exit too).
> 
> But if you don't go to mirror_exit because cnt != 0, you must remove the
> blocker before the next I/O.
> 

OK, but I'm still not clear how is it too late in this patch? Although the
blocker is set after bdrv_drain, we know there is no dirty data because cnt is
0, and we'll be holding a blocker when releasing the AioContext, no new IO is
allowed.

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]