Received: from eggs.gnu.org ([2001:4830:134:3::10]:60372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMq7J-0002nm-P1 for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:20:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMq7H-0005Rb-TH for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:20:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMq7H-0005RU-Nn for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:20:19 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 65EBBC04D302 for ; Tue, 12 Jul 2016 05:20:19 +0000 (UTC) From: Fam Zheng Date: Tue, 12 Jul 2016 13:20:00 +0800 Message-Id: <1468300800-31256-7-git-send-email-famz@redhat.com> In-Reply-To: <1468300800-31256-1-git-send-email-famz@redhat.com> References: <1468300800-31256-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 6/6] Revert "mirror: Workaround for unexpected iohandler events during completion" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, mst@redhat.com, kwolf@redhat.com, pbonzini@redhat.com This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef. The virtio storage device host notifiers now work with bdrv_drained_begin/end, so we don't need this hack any more. Signed-off-by: Fam Zheng --- block/mirror.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 8d96049..8a452a2 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -506,9 +506,6 @@ static void mirror_exit(BlockJob *job, void *opaque) block_job_completed(&s->common, data->ret); g_free(data); bdrv_drained_end(src); - if (qemu_get_aio_context() == bdrv_get_aio_context(src)) { - aio_enable_external(iohandler_get_aio_context()); - } bdrv_unref(src); } @@ -732,12 +729,6 @@ immediate_exit: /* Before we switch to target in mirror_exit, make sure data doesn't * change. */ bdrv_drained_begin(bs); - if (qemu_get_aio_context() == bdrv_get_aio_context(bs)) { - /* FIXME: virtio host notifiers run on iohandler_ctx, therefore the - * above bdrv_drained_end isn't enough to quiesce it. This is ugly, we - * need a block layer API change to achieve this. */ - aio_disable_external(iohandler_get_aio_context()); - } block_job_defer_to_main_loop(&s->common, mirror_exit, data); } -- 2.7.4