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: 9226785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 41C0060868 for ; Wed, 13 Jul 2016 05:14:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33AD327813 for ; Wed, 13 Jul 2016 05:14:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2849F2793D; Wed, 13 Jul 2016 05:14:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 287A227813 for ; Wed, 13 Jul 2016 05:14:50 +0000 (UTC) Received: from localhost ([::1]:45190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNCVV-00072C-86 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 Jul 2016 01:14:49 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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); }