From patchwork Wed Jul 13 05:09:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 647703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rq6VF10qVz9ssP for ; Wed, 13 Jul 2016 15:15:33 +1000 (AEST) Received: from localhost ([::1]:45198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNCWA-0007v8-Oq for incoming@patchwork.ozlabs.org; Wed, 13 Jul 2016 01:15:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNCQz-0001V7-Fl for qemu-devel@nongnu.org; Wed, 13 Jul 2016 01:10:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNCQy-0004Xj-F8 for qemu-devel@nongnu.org; Wed, 13 Jul 2016 01:10:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNCQy-0004XV-9j for qemu-devel@nongnu.org; Wed, 13 Jul 2016 01:10:08 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 040DED47B5; Wed, 13 Jul 2016 05:10:08 +0000 (UTC) Received: from ad.usersys.redhat.com (dhcp-14-122.nay.redhat.com [10.66.14.122]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6D59sbp017101; Wed, 13 Jul 2016 01:10:06 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 13 Jul 2016 13:09:47 +0800 Message-Id: <1468386588-26584-6-git-send-email-famz@redhat.com> In-Reply-To: <1468386588-26584-1-git-send-email-famz@redhat.com> References: <1468386588-26584-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 13 Jul 2016 05:10:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 5/6] Revert "mirror: Workaround for unexpected iohandler events during completion" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cornelia.huck@de.ibm.com, kwolf@redhat.com, mst@redhat.com, stefanha@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Cornelia Huck --- 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); }