On Fri, 05/15 14:22, Wen Congyang wrote: > On 05/15/2015 02:04 PM, Fam Zheng wrote: > > It blocks device IO. > > I am reading mirror codes recently, and have a question: > When block job mirror is finished, the source and target is synced. But we > call bdrv_swap() later(in bh context). Can the guest write something to > the source before the bh is scheduled? If the answer is yes, I think > we should use this to block the guest's disk I/O.
I think you're right. After mirror_run returns, anything can happen on this aio context, including guest writing. Fam