Message ID | 20180813022006.7216-16-mreitz@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90FF713B4 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 13 Aug 2018 02:32:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8396628FFD for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 13 Aug 2018 02:32:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 776122907E; Mon, 13 Aug 2018 02:32:08 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 2ADD228FFD for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 13 Aug 2018 02:32:08 +0000 (UTC) Received: from localhost ([::1]:37228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1fp2eN-0005c0-EZ for patchwork-qemu-devel@patchwork.kernel.org; Sun, 12 Aug 2018 22:32:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <mreitz@redhat.com>) id 1fp2TU-0003nt-4S for qemu-devel@nongnu.org; Sun, 12 Aug 2018 22:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <mreitz@redhat.com>) id 1fp2TT-0008LP-DG for qemu-devel@nongnu.org; Sun, 12 Aug 2018 22:20:52 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57608 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <mreitz@redhat.com>) id 1fp2TR-0008K7-FP; Sun, 12 Aug 2018 22:20:49 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1869C7C809; Mon, 13 Aug 2018 02:20:49 +0000 (UTC) Received: from localhost (ovpn-204-21.brq.redhat.com [10.40.204.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66B1E2026D6D; Mon, 13 Aug 2018 02:20:48 +0000 (UTC) From: Max Reitz <mreitz@redhat.com> To: qemu-block@nongnu.org Date: Mon, 13 Aug 2018 04:20:04 +0200 Message-Id: <20180813022006.7216-16-mreitz@redhat.com> In-Reply-To: <20180813022006.7216-1-mreitz@redhat.com> References: <20180813022006.7216-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 13 Aug 2018 02:20:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 13 Aug 2018 02:20:49 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mreitz@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 15/17] mirror: Release AioCtx before queue_restart_all() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Kevin Wolf <kwolf@redhat.com>, Jeff Cody <jcody@redhat.com>, Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
mirror: Mainly coroutine refinements
|
expand
|
diff --git a/block/mirror.c b/block/mirror.c index 053c37b6a6..cba7de610e 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -395,10 +395,10 @@ static void coroutine_fn mirror_co_perform(void *opaque) } } + aio_context_release(aio_context); + qemu_co_queue_restart_all(&op->waiting_requests); g_free(op); - - aio_context_release(aio_context); } /* If mirror_method == MIRROR_METHOD_COPY, *offset and *bytes will be
Calling qemu_co_queue_restart_all() with a held AioContext looks a bit strange. There is no reason why we would hold the context any longer (as this coroutine is not going to perform any further operations that would necessitate it), so release it before restarting the waiting requests. Signed-off-by: Max Reitz <mreitz@redhat.com> --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)