Message ID | 20230420113732.336620-5-stefanha@redhat.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <xen-devel-bounces@lists.xenproject.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E31FC77B72 for <xen-devel@archiver.kernel.org>; Thu, 20 Apr 2023 11:38:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.524132.814798 (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1ppScP-0002t8-Re; Thu, 20 Apr 2023 11:38:29 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 524132.814798; Thu, 20 Apr 2023 11:38:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1ppScP-0002sz-P0; Thu, 20 Apr 2023 11:38:29 +0000 Received: by outflank-mailman (input) for mailman id 524132; Thu, 20 Apr 2023 11:38:28 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <SRS0=onos=AL=redhat.com=stefanha@srs-se1.protection.inumbo.net>) id 1ppScO-0002cJ-Ih for xen-devel@lists.xenproject.org; Thu, 20 Apr 2023 11:38:28 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id dd9ef4fb-df6f-11ed-b21f-6b7b168915f2; Thu, 20 Apr 2023 13:38:28 +0200 (CEST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-179-ZfmDbr5BPEGcI-TkGJ9ftw-1; Thu, 20 Apr 2023 07:38:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CC1A43C106AD; Thu, 20 Apr 2023 11:38:22 +0000 (UTC) Received: from localhost (unknown [10.39.193.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3653640BC798; Thu, 20 Apr 2023 11:38:21 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> X-Inumbo-ID: dd9ef4fb-df6f-11ed-b21f-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681990706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cpef4kT6gqf7n/rR0/ynntTmCBLqt8QRSEC7iM5/ics=; b=NppMzTwMG4TkN0+g+uLrJIVy3l1ZuT19TuVx2gqvqJ05deYCFkOtq42HmqYoBRRWaU0I9M N3N93axiU/ujJr2PLSDuHucuUrmG4VJmsvKUqvCcEXjzScj2c6ohZ3ArPP5FcvNH99Sgin qYyZZSd0C8wvjsLfm5QoLyS04aunt2I= X-MC-Unique: ZfmDbr5BPEGcI-TkGJ9ftw-1 From: Stefan Hajnoczi <stefanha@redhat.com> To: qemu-devel@nongnu.org Cc: Peter Lieven <pl@kamp.de>, Stefan Hajnoczi <stefanha@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, Xie Yongji <xieyongji@bytedance.com>, Juan Quintela <quintela@redhat.com>, qemu-block@nongnu.org, Eduardo Habkost <eduardo@habkost.net>, Richard Henderson <richard.henderson@linaro.org>, David Woodhouse <dwmw2@infradead.org>, Stefan Weil <sw@weilnetz.de>, Fam Zheng <fam@euphon.net>, Julia Suvorova <jusual@redhat.com>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, xen-devel@lists.xenproject.org, Hanna Reitz <hreitz@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, eesposit@redhat.com, Kevin Wolf <kwolf@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Stefano Stabellini <sstabellini@kernel.org>, Paul Durrant <paul@xen.org>, Aarushi Mehta <mehta.aaru20@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Anthony Perard <anthony.perard@citrix.com>, "Richard W.M. Jones" <rjones@redhat.com>, Coiby Xu <Coiby.Xu@gmail.com>, Stefano Garzarella <sgarzare@redhat.com> Subject: [PATCH v3 04/20] block/export: only acquire AioContext once for vhost_user_server_stop() Date: Thu, 20 Apr 2023 07:37:16 -0400 Message-Id: <20230420113732.336620-5-stefanha@redhat.com> In-Reply-To: <20230420113732.336620-1-stefanha@redhat.com> References: <20230420113732.336620-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 |
Series |
block: remove aio_disable_external() API
|
expand
|
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index 40f36ea214..5b6216069c 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -346,10 +346,9 @@ static void vu_accept(QIONetListener *listener, QIOChannelSocket *sioc, aio_context_release(server->ctx); } +/* server->ctx acquired by caller */ void vhost_user_server_stop(VuServer *server) { - aio_context_acquire(server->ctx); - qemu_bh_delete(server->restart_listener_bh); server->restart_listener_bh = NULL; @@ -366,8 +365,6 @@ void vhost_user_server_stop(VuServer *server) AIO_WAIT_WHILE(server->ctx, server->co_trip); } - aio_context_release(server->ctx); - if (server->listener) { qio_net_listener_disconnect(server->listener); object_unref(OBJECT(server->listener));
vhost_user_server_stop() uses AIO_WAIT_WHILE(). AIO_WAIT_WHILE() requires that AioContext is only acquired once. Since blk_exp_request_shutdown() already acquires the AioContext it shouldn't be acquired again in vhost_user_server_stop(). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- util/vhost-user-server.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)