From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCstq-00013q-BU for qemu-devel@nongnu.org; Tue, 14 Jun 2016 14:17:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCstj-0002jy-4J for qemu-devel@nongnu.org; Tue, 14 Jun 2016 14:17:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCsti-0002jq-Ue for qemu-devel@nongnu.org; Tue, 14 Jun 2016 14:17:11 -0400 From: Stefan Hajnoczi Date: Tue, 14 Jun 2016 19:17:03 +0100 Message-Id: <1465928228-1184-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH v4 0/5] blockjob: AioContext change support for mirror and backup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , jjherne@linux.vnet.ibm.com, Fam Zheng , Paolo Bonzini , Jeff Cody , mreitz@redhat.com, Stefan Hajnoczi v4: * Add .pause()/.resume() callbacks to really quiesce during block_job_pause_point() [Paolo] * Add AioContext change support for backup block job * Tested drive_mirror + migration and drive_backup + reboot v3: * Push infrastructure down into blockjob.c so other jobs can reuse it [Stefan] * Tested with drive_mirror + migration [Stefan] v2: * Fam introduced the concept of a synchronous aio_poll() loop to quiesce the block job during detach When dataplane is enabled or disabled the drive switches to a new AioContext. The mirror and backup block jobs must also move to the new AioContext so that drive accesses are always made within its AioContext. This series extends the block job pause functionality so that detaching from an AioContext pauses the job and attaching to the new AioContext resumes the job. Pause points are added to the mirror job so that long I/O loops can yield for an AioContext switch. Other block jobs need pause points too but this can be done as a follow-up series. Stefan Hajnoczi (5): blockjob: move iostatus reset out of block_job_enter() blockjob: add pause points blockjob: add AioContext attached callback mirror: follow AioContext change gracefully backup: follow AioContext change gracefully block/backup.c | 22 ++++++++----- block/mirror.c | 45 +++++++++++++++++++++----- blockdev.c | 1 + blockjob.c | 84 ++++++++++++++++++++++++++++++++++++++++++------ include/block/blockjob.h | 42 ++++++++++++++++++++++-- 5 files changed, 166 insertions(+), 28 deletions(-) -- 2.5.5