On Sun, Jun 12, 2016 at 02:51:04PM +0800, Fam Zheng wrote: > From: Stefan Hajnoczi <stefa...@redhat.com> > > When dataplane is enabled or disabled the drive switches to a new > AioContext. The mirror block job must also move to the new AioContext > so that drive accesses are always made within its AioContext. > > This patch partially achieves that by draining target and source > requests to reach a quiescent point. The job is resumed in the new > AioContext after moving s->target into the new AioContext. > > The quiesce_requested flag is added to deal with yield points in > block_job_sleep_ns(), bdrv_is_allocated_above(), and > bdrv_get_block_status_above(). Previously they continue executing in > the old AioContext. The nested aio_poll in mirror_detach_aio_context > will drive the mirror coroutine upto fixed yield points, where > mirror_check_for_quiesce is called. > > Cc: Fam Zheng <f...@redhat.com> > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Jeff Cody <jc...@redhat.com> > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > [Drain source as well, and add s->quiesce_requested flag. -- Fam] > Signed-off-by: Fam Zheng <f...@redhat.com> > > --- > > v2: Picked up Stefan's RFC patch and move on towards a more complete > fix. Please review!
Thanks, I'll send a v3 with my own comment addressed and fixes for other block jobs.
signature.asc
Description: PGP signature