From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663837479; cv=none; d=zohomail.com; s=zohoarc; b=P+92rrz/0jebLF+xGKTA2iN70Q6AIHzfCLmpLTV3J747wxNayGLAz09HKZhxW7qkWkyHhlGMk8vn9rKrBYMzvO0QFDClljZXMYbPpcLP3jYOoFx+xLRoYdpyvLP8EgR3B1Nfx2UEklkc+KAe1yAKUnbbZ/EaW8HduboGdj5cWOY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663837479; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LXUPCEKsOWKG9QuHsF9Ng0OAJFz0RxXDrXgSaXJGzLc=; b=SAx4gIeRRyVKoZaq2SWU7sxUHXB0iScfZS8FyjygZjl8Bz+rNL9WBz1tJMoP2o4zmia1iSJT89g7L59qa1bi4dd6e+iCL5aGfeK6DM26iOs7D4QJE3005STrKPidggpD+TkTnfg3cQi2Fe5HjpHZF3CugVStwAI0YEZJ1+FCjsM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663837479397430.48272225079893; Thu, 22 Sep 2022 02:04:39 -0700 (PDT) Received: from localhost ([::1]:33022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obI8L-00079O-6x for importer@patchew.org; Thu, 22 Sep 2022 05:04:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtn-0004HH-Hk for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:34814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtj-000372-TG for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:33 -0400 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-369-c_sh_XnTPMOygnDKkP1Cdw-1; Thu, 22 Sep 2022 04:49:29 -0400 Received: by mail-ej1-f69.google.com with SMTP id sh31-20020a1709076e9f00b00781c4e720feso3758293ejc.8 for ; Thu, 22 Sep 2022 01:49:28 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id d22-20020a056402079600b0044625884285sm3228003edy.49.2022.09.22.01.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LXUPCEKsOWKG9QuHsF9Ng0OAJFz0RxXDrXgSaXJGzLc=; b=alK040UcuVSRE5ufVMD9plwMPDUuATRf1Zm/0uwd5LbQOf/jupIw+4S3Oe26Woex3KTVn8 6+yESY3gDEW83cVjfRQ6O6OhBpW/P/3nzC2eRpodAeAwdBTmEcCR2+MuHuUCWAlqJsJG8w uaZCt1hCx5REMYQpIuJPdUtxN2AQwcU= X-MC-Unique: c_sh_XnTPMOygnDKkP1Cdw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=LXUPCEKsOWKG9QuHsF9Ng0OAJFz0RxXDrXgSaXJGzLc=; b=IsZW2XncnvW4VcuCOoD6Jv9RKC5ilBZa/VTCEQqfRvUXR9luKUfgvpMXw3EKrjloco ti59DZCJhSeBkYxTcTfsCZx0ePeAkFZ6LK1N0/cydims/NxIagAAX4nE9EhAd5HvPSNl dmstHreU2MeBydmCL8RzDLEPeZI06yzoRq6GN5If5unzikM6SsYDeFavKGTWVjQxdvuN V/POHsFPB7QKeaaPS8ulA5JRONjuwAsmHyfoqHu2A+2AfYhFSF3oeSX7hVp8aJRNtDx0 MM9XFe0skvXMKuBSalUy1j4YCo11NbaQfDjYe9gPcPfihc/sYbvo5hGtNGmuFusKuid1 ZiUg== X-Gm-Message-State: ACrzQf32YrVWGc2lowzRPzuCkPdizHvqlA8RrwTZrZ4EZB9jOh5fOLdx DkaeTZB4ACfyKjhfz3VPwWTnEVIf9xZXn8mtU2FbVZ2KaoLbZPWvV4KS1eKeWaZyNd1q6h1Lraa E/TEUq9f/U5BFEVGFz5ddtLy5uo0ZQKwfhygu6hC5RY687aIFuTAIZFBFRBvaLXSjoj8= X-Received: by 2002:aa7:cb4f:0:b0:453:88d0:bed0 with SMTP id w15-20020aa7cb4f000000b0045388d0bed0mr2135427edt.127.1663836567436; Thu, 22 Sep 2022 01:49:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM77RCRb22hM+UzOgb3JVupCTDDGnUrz21Q1jonC9M5Sc5ud7ZLtmrDKndsxrrndSynL2cA+4Q== X-Received: by 2002:aa7:cb4f:0:b0:453:88d0:bed0 with SMTP id w15-20020aa7cb4f000000b0045388d0bed0mr2135407edt.127.1663836567217; Thu, 22 Sep 2022 01:49:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 01/26] block/nvme: separate nvme_get_free_req cases for coroutine/non-coroutine context Date: Thu, 22 Sep 2022 10:48:59 +0200 Message-Id: <20220922084924.201610-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663837480850100001 Content-Type: text/plain; charset="utf-8" nvme_get_free_req has very difference semantics when called in coroutine context (where it waits) and in non-coroutine context (where it doesn't). Split the two cases to make it clear what is being requested. Cc: qemu-block@nongnu.org Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/nvme.c | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index 01fb28aa63..3e6abef1ce 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -293,34 +293,42 @@ static void nvme_kick(NVMeQueuePair *q) q->need_kick =3D 0; } =20 -/* Find a free request element if any, otherwise: - * a) if in coroutine context, try to wait for one to become available; - * b) if not in coroutine, return NULL; - */ -static NVMeRequest *nvme_get_free_req(NVMeQueuePair *q) +static NVMeRequest *nvme_get_free_req_nofail_locked(NVMeQueuePair *q) { NVMeRequest *req; =20 - qemu_mutex_lock(&q->lock); - - while (q->free_req_head =3D=3D -1) { - if (qemu_in_coroutine()) { - trace_nvme_free_req_queue_wait(q->s, q->index); - qemu_co_queue_wait(&q->free_req_queue, &q->lock); - } else { - qemu_mutex_unlock(&q->lock); - return NULL; - } - } - req =3D &q->reqs[q->free_req_head]; q->free_req_head =3D req->free_req_next; req->free_req_next =3D -1; - - qemu_mutex_unlock(&q->lock); return req; } =20 +/* Return a free request element if any, otherwise return NULL. */ +static NVMeRequest *nvme_get_free_req_nowait(NVMeQueuePair *q) +{ + QEMU_LOCK_GUARD(&q->lock); + if (q->free_req_head =3D=3D -1) { + return NULL; + } + return nvme_get_free_req_nofail_locked(q); +} + +/* + * Wait for a free request to become available if necessary, then + * return it. + */ +static coroutine_fn NVMeRequest *nvme_get_free_req(NVMeQueuePair *q) +{ + QEMU_LOCK_GUARD(&q->lock); + + while (q->free_req_head =3D=3D -1) { + trace_nvme_free_req_queue_wait(q->s, q->index); + qemu_co_queue_wait(&q->free_req_queue, &q->lock); + } + + return nvme_get_free_req_nofail_locked(q); +} + /* With q->lock */ static void nvme_put_free_req_locked(NVMeQueuePair *q, NVMeRequest *req) { @@ -506,7 +514,7 @@ static int nvme_admin_cmd_sync(BlockDriverState *bs, Nv= meCmd *cmd) AioContext *aio_context =3D bdrv_get_aio_context(bs); NVMeRequest *req; int ret =3D -EINPROGRESS; - req =3D nvme_get_free_req(q); + req =3D nvme_get_free_req_nowait(q); if (!req) { return -EBUSY; } --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838069; cv=none; d=zohomail.com; s=zohoarc; b=dnzLqr+LDMB020bIF6c7Z+jSZdymh50wi0wpvp2C6SniN0bDUnnay8RVpvnzb3kCMUngK/0HjWhCB5oqzFPqTLrjSak3GjIMMJnEkgwZggn9AOw4YMAQ5AM9gE86aha7ywbS/R7Vahumu24HhH0QOFqxRioEiEH4baDGega308o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838069; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gEG7sP+TZ893sNXFvklbS5KEErh7APC8OAUbfr5xMK4=; b=dThRb8Uz6TEAXofWQJqfzRcUfvEXztiTjmrmjN0VaMi4vLYH2OiSA11pFu6Kzw88I4comLonm4YJ6q2tQQss6+MkaO9qREpROeSB2gUaKlS4W2I8CbkyRc4za8liHKrA01tjPHa/UfgAPfxavtJNL3eoz/UcqfSOJ+HUSHGLlZw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838069271790.0040747387543; Thu, 22 Sep 2022 02:14:29 -0700 (PDT) Received: from localhost ([::1]:34426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIHs-0006Cg-7g for importer@patchew.org; Thu, 22 Sep 2022 05:14:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtq-0004HM-3J for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtn-00037P-6H for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:37 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-364-7nHrCHRQOTaXfnP5f83cgw-1; Thu, 22 Sep 2022 04:49:31 -0400 Received: by mail-ed1-f69.google.com with SMTP id r11-20020a05640251cb00b004516feb8c09so6175970edd.10 for ; Thu, 22 Sep 2022 01:49:31 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w13-20020a17090652cd00b0073cd7cc2c81sm2307783ejn.181.2022.09.22.01.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gEG7sP+TZ893sNXFvklbS5KEErh7APC8OAUbfr5xMK4=; b=ODZEF/NzqHNzj5pmsBkvVNZC/64kHlYgfRqQp02Nemv3JlqBB0pkDgBEhHlWnJfQZFbPXY pZIZoSr55ZF3sfbn8BaRs7f914TSqDtNZO+IKGQ5ItG5d6WAQrcUKSkRMpnABRvD+NI+lI Wpkbn1NBtE6K3XCLKJQIUDuDiKec0DA= X-MC-Unique: 7nHrCHRQOTaXfnP5f83cgw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=gEG7sP+TZ893sNXFvklbS5KEErh7APC8OAUbfr5xMK4=; b=iwOLEa2CH+kkITtFAP8fQ474f9k4ioFNZhaHaka7AxFj8Oodsv42pKpQ7EdGKmBNNo 9dY7URW3StPC8QGlM35tsWq8D5Unj2XAGZo9u+KF8ofO3YxSezlk1yxFUV3xMKPv9AtU UQmFhLfcW37L12Nzbu9jRWRiCIbP3g4WuZy0hq30tewhR84n5xGil4ZaBxDFxWUaPnzV erohv65/FlzjE9VQd4QOvj91H2Mlmsf6cB0RVDOo3rbeSoA9uV4101fjbur1FvJLGOnZ +Ak9+5HY49kmEWLG7lRd+aXW0MrD+ppqRp+Jn/A9xgZ5J1N905m5Z/8jqlAztdxpKYet iRSA== X-Gm-Message-State: ACrzQf1WXJfACdzdeH4kMAVCFbJY3xCwdtABkPtCzOmubbrjn8Cqd1wN Cs1KTjucABNrKqH6dBhRvm15RKfH4kr32of26AcXku1Q++Ml/U7C8aLct16MIkZzNQpNixmIxf/ trjYxxZ9pxa/w+ktrqLM8K2oN3iiFXoKScu1+aOYJR0Lby0e1LYWuA+OzwIJ/Mp3w/Kk= X-Received: by 2002:a05:6402:2816:b0:434:ed38:16f3 with SMTP id h22-20020a056402281600b00434ed3816f3mr2165376ede.116.1663836570034; Thu, 22 Sep 2022 01:49:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HFQ9PbHWqPQLo/qYdLuawfXkVHpXtPhcQK3aHQpDfrbwt1jPnoAKYlDyXZgqh11+YDojHxg== X-Received: by 2002:a05:6402:2816:b0:434:ed38:16f3 with SMTP id h22-20020a056402281600b00434ed3816f3mr2165355ede.116.1663836569823; Thu, 22 Sep 2022 01:49:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 02/26] block: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:00 +0200 Message-Id: <20220922084924.201610-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838071001100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Paolo Bonzini Reviewed-by: Alberto Faria --- block.c | 6 +++--- block/block-backend.c | 10 +++++----- block/io.c | 22 +++++++++++----------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/block.c b/block.c index bc85f46eed..5c34ada53f 100644 --- a/block.c +++ b/block.c @@ -631,9 +631,9 @@ static int64_t create_file_fallback_truncate(BlockBacke= nd *blk, * Helper function for bdrv_create_file_fallback(): Zero the first * sector to remove any potentially pre-existing image header. */ -static int create_file_fallback_zero_first_sector(BlockBackend *blk, - int64_t current_size, - Error **errp) +static int coroutine_fn create_file_fallback_zero_first_sector(BlockBacken= d *blk, + int64_t cur= rent_size, + Error **err= p) { int64_t bytes_to_clear; int ret; diff --git a/block/block-backend.c b/block/block-backend.c index d4a5df2ac2..aa4adf06ae 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1546,7 +1546,7 @@ static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, in= t64_t offset, return &acb->common; } =20 -static void blk_aio_read_entry(void *opaque) +static void coroutine_fn blk_aio_read_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1558,7 +1558,7 @@ static void blk_aio_read_entry(void *opaque) blk_aio_complete(acb); } =20 -static void blk_aio_write_entry(void *opaque) +static void coroutine_fn blk_aio_write_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1669,7 +1669,7 @@ int coroutine_fn blk_co_ioctl(BlockBackend *blk, unsi= gned long int req, return ret; } =20 -static void blk_aio_ioctl_entry(void *opaque) +static void coroutine_fn blk_aio_ioctl_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1703,7 +1703,7 @@ blk_co_do_pdiscard(BlockBackend *blk, int64_t offset,= int64_t bytes) return bdrv_co_pdiscard(blk->root, offset, bytes); } =20 -static void blk_aio_pdiscard_entry(void *opaque) +static void coroutine_fn blk_aio_pdiscard_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1747,7 +1747,7 @@ static int coroutine_fn blk_co_do_flush(BlockBackend = *blk) return bdrv_co_flush(blk_bs(blk)); } =20 -static void blk_aio_flush_entry(void *opaque) +static void coroutine_fn blk_aio_flush_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; diff --git a/block/io.c b/block/io.c index 0a8cbefe86..e3dcb8e7e6 100644 --- a/block/io.c +++ b/block/io.c @@ -751,11 +751,11 @@ static void coroutine_fn tracked_request_end(BdrvTrac= kedRequest *req) /** * Add an active request to the tracked requests list */ -static void tracked_request_begin(BdrvTrackedRequest *req, - BlockDriverState *bs, - int64_t offset, - int64_t bytes, - enum BdrvTrackedRequestType type) +static void coroutine_fn tracked_request_begin(BdrvTrackedRequest *req, + BlockDriverState *bs, + int64_t offset, + int64_t bytes, + enum BdrvTrackedRequestType= type) { bdrv_check_request(offset, bytes, &error_abort); =20 @@ -794,7 +794,7 @@ static bool tracked_request_overlaps(BdrvTrackedRequest= *req, } =20 /* Called with self->bs->reqs_lock held */ -static BdrvTrackedRequest * +static coroutine_fn BdrvTrackedRequest * bdrv_find_conflicting_request(BdrvTrackedRequest *self) { BdrvTrackedRequest *req; @@ -1644,10 +1644,10 @@ static bool bdrv_init_padding(BlockDriverState *bs, return true; } =20 -static int bdrv_padding_rmw_read(BdrvChild *child, - BdrvTrackedRequest *req, - BdrvRequestPadding *pad, - bool zero_middle) +static coroutine_fn int bdrv_padding_rmw_read(BdrvChild *child, + BdrvTrackedRequest *req, + BdrvRequestPadding *pad, + bool zero_middle) { QEMUIOVector local_qiov; BlockDriverState *bs =3D child->bs; @@ -3168,7 +3168,7 @@ out: return ret; } =20 -int bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf) +int coroutine_fn bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf) { BlockDriver *drv =3D bs->drv; CoroutineIOCompletion co =3D { --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663837631; cv=none; d=zohomail.com; s=zohoarc; b=DUW1VRhF+zs3EXil092wN98UwE3UKIlDDgEbXq8/+gtREduTdQmYzpF1dLCaPq/klTCWepkE47Qx0eWGkswrFQ1XMXFSvG5+ZJi/eV6pQQoBXjOO98vHtBQ0jb6XwqOHtK1JwRSgDPC/B8/B7R7+wdhc0pmz/j3nCxP0c1rZ17k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663837631; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DiNau0XrV+NcLz+unml0gyWosKKTn8Rulie3wDNrngA=; b=XQwm51J7FuRzJe6ywjdKb8YG3S/pmRjx4B+9w5iMsfU7DJFtQZ7wU5zHM2QJElFQ8AP75UV21/4aD1ss2ZYgbbzB0l3YJxzkFowzDoGnZWMcHZj2AXah2kKlSuJzgbbFDtFQj0zmHvBth83f0CKOtehez5gcDAupAqeRj0lBUU0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663837631291668.1240395472546; Thu, 22 Sep 2022 02:07:11 -0700 (PDT) Received: from localhost ([::1]:59740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIAn-00089m-9p for importer@patchew.org; Thu, 22 Sep 2022 05:07:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtq-0004HL-2q for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtn-00038l-AS for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:37 -0400 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-480-W4xPcIiGO5mqwc8aHk_Tyg-1; Thu, 22 Sep 2022 04:49:33 -0400 Received: by mail-ej1-f71.google.com with SMTP id hr12-20020a1709073f8c00b0077e8371f847so4240531ejc.20 for ; Thu, 22 Sep 2022 01:49:32 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id 17-20020a170906201100b00731803d4d04sm2289348ejo.82.2022.09.22.01.49.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DiNau0XrV+NcLz+unml0gyWosKKTn8Rulie3wDNrngA=; b=ep5EYrjobqBfh92rCDOcSZDP3k/R0JNzlpucpKnAwVCrIjr34DIzoocBhLwmzWpgotuCQ4 BL0+VKzbKrf0Ipb1XJLDNOTtg5lOqZW/p02JTliWrqKYtfhR47D/Iz/XZAfF2Sfj0JbP9T 7P+Ac5AmggVqj1PCy3hO+YFvIDGY8m4= X-MC-Unique: W4xPcIiGO5mqwc8aHk_Tyg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=DiNau0XrV+NcLz+unml0gyWosKKTn8Rulie3wDNrngA=; b=gaPgs/XvYFx1aCWgNwwvKMp+XV3Io9GUPaVVr1PamuGe5edXCf8WHiqdke/WULtAd0 Ege7xbV+5slkXID/Nn1KH6j1/nxUSUxhH3FttGHkCNiBMIotnwXPBx8sz30kJ+NjW9dn NR+8tNOw4MpfjQW1cqDGT3A0XUAAbdu6n7eLOQPeePISp4LUsnA+0mFS03Gc7/vYwoJC P9ty7woj8l4IPITx7zmOU/09h8EbtxziNDkEveo6E5okSl2k+/HqisSXDoSxbeqweF4Z 5NYzXDerTaHC36azRMagexMIGKD8DYNdjskhFVeOCW9/JPpDmz1ahH9bcJSdVkrUziaF pQ3w== X-Gm-Message-State: ACrzQf0KRSDpmHpH54CXU+OZGH+8yvybJ0H7x3LmkdyxjLVpm2wU3LEG PDxxv61I31mjIEhbSeOda7dqDO8P7LCy8vk0+LTmk/M2xoFOPSv10OnKTfFMmeR5eUT2I8vhuZI P+E6FOdGKZFTFYY4apt6JMiKfYb2XfdsL6KhKzQxHsarKS+5vIb9IaFaV+aaDq4oVYm8= X-Received: by 2002:a05:6402:114a:b0:454:85e4:2295 with SMTP id g10-20020a056402114a00b0045485e42295mr2179687edw.348.1663836571624; Thu, 22 Sep 2022 01:49:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7EAAlxx8Kt98tfB16fv7ZAaiO3BS3SwXCyvoHg/VfM5lTgH0ETcxd8ySdUBAhHYu1EcpxaWQ== X-Received: by 2002:a05:6402:114a:b0:454:85e4:2295 with SMTP id g10-20020a056402114a00b0045485e42295mr2179667edw.348.1663836571404; Thu, 22 Sep 2022 01:49:31 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, Eric Blake Subject: [PATCH 03/26] qcow2: remove incorrect coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:01 +0200 Message-Id: <20220922084924.201610-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663837632606100001 Content-Type: text/plain; charset="utf-8" This is incorrect because qcow2_mark_clean() calls qcow2_flush_caches(). qcow2_mark_clean() is called from non-coroutine context in qcow2_inactivate() and qcow2_amend_options(). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/qcow2-refcount.c | 4 ++-- block/qcow2.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index c4d99817b6..1a6277c783 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -1206,7 +1206,7 @@ void qcow2_free_any_cluster(BlockDriverState *bs, uin= t64_t l2_entry, } } =20 -int coroutine_fn qcow2_write_caches(BlockDriverState *bs) +int qcow2_write_caches(BlockDriverState *bs) { BDRVQcow2State *s =3D bs->opaque; int ret; @@ -1226,7 +1226,7 @@ int coroutine_fn qcow2_write_caches(BlockDriverState = *bs) return 0; } =20 -int coroutine_fn qcow2_flush_caches(BlockDriverState *bs) +int qcow2_flush_caches(BlockDriverState *bs) { int ret =3D qcow2_write_caches(bs); if (ret < 0) { diff --git a/block/qcow2.h b/block/qcow2.h index ba436a8d0d..c8d9e8ea79 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -874,8 +874,8 @@ void qcow2_free_any_cluster(BlockDriverState *bs, uint6= 4_t l2_entry, int qcow2_update_snapshot_refcount(BlockDriverState *bs, int64_t l1_table_offset, int l1_size, int addend); =20 -int coroutine_fn qcow2_flush_caches(BlockDriverState *bs); -int coroutine_fn qcow2_write_caches(BlockDriverState *bs); +int qcow2_flush_caches(BlockDriverState *bs); +int qcow2_write_caches(BlockDriverState *bs); int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix); =20 --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663837243; cv=none; d=zohomail.com; s=zohoarc; b=dIDD2ffpSsowz7VudYWZH1x6pwS461bMiPkaA5sQrXdI4mYm84/QUI3sVAfFwQWh9aE5DEa1MWkWXHPBJBLVb/S4SGxeruOYUmpf0BxTU+TRG88OhxpvnT4mTHbkmL6Sbvn2TXaMslDTTKYHJe0DGwLIb7hsPPbbh/+QOZvpq2o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663837243; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lGOEj22T6lvWm61okRSFdvQTf9Aoa2AFT1tkZ6fRMl0=; b=OhTVPQT+PXIfALiRALrEvTT6+T9YC0pM3qvgOPe7NldAnWUen5dTKs9aYKp3MXKzlb+2/Yzr3nPOSeKQ+emtomEBmWY488bddunkfdnwpJj8EH86qB+U/JAV5ZBtmHvRIaYc3tEMkr7troq4vpP0mtyzVu5VBH2SV2gu7PBBAT4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663837243506485.6113669298685; Thu, 22 Sep 2022 02:00:43 -0700 (PDT) Received: from localhost ([::1]:46766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obI4Y-0004ED-En for importer@patchew.org; Thu, 22 Sep 2022 05:00:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtt-0004Ho-LW for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHto-000391-5I for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:41 -0400 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-224-ofAqmCJSPrONCTufrw5JVQ-1; Thu, 22 Sep 2022 04:49:34 -0400 Received: by mail-ej1-f72.google.com with SMTP id sa15-20020a1709076d0f00b00781d793f51fso1346172ejc.18 for ; Thu, 22 Sep 2022 01:49:34 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id ky6-20020a170907778600b00778e3e2830esm2384298ejc.9.2022.09.22.01.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lGOEj22T6lvWm61okRSFdvQTf9Aoa2AFT1tkZ6fRMl0=; b=ILunKviOm1pAhPU5JUe+Q/dyZQzSoyFHUOsO3M0q8PiqoLGlTEkXlTO0zgQqgfPkKkSKih SL+mLh0Qo8sEPLuXOxPLmPrfeGPNbZwVgK2YnQpIocNNjyebrt7S4T3kdqLIlE9NSwf16C D6wlzzhIICLwm56AZHAsGUg4eULgsWs= X-MC-Unique: ofAqmCJSPrONCTufrw5JVQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=lGOEj22T6lvWm61okRSFdvQTf9Aoa2AFT1tkZ6fRMl0=; b=5gpmETe9B91876eUMsiN/+C/0x/FRoIsmie89VbnAn9oTL2ZPsal2Dd0/x7ivhpHl6 sVSVefsME9NZYmRSf6zqZLXTquxn5CtGTA/6RtovrjLk+SZC7xXYbJSK/vWY6BH3ozIX 8ig4MO/HGTXUb08X6A48DD+rpQfW5Y341ZZB4Hr0qlsV30Raf6K6OjBdrRDeBPczgBa6 9CJU8KIpsOi4T/wOO9dFFGHGNcI9CB0ngA68xvnRq0ce41H/MAvRspy2qNu6m9LEh4nb 1pcYC9KAWgwo0SafMCeS2qgOZyO5po/fgG+y86s1DYGnYitN1TzTSU7TVpU9w+cN+QO4 Q5qA== X-Gm-Message-State: ACrzQf1JDYBUZJiWFDXQu3yhifRpzfovsRUdKi90KTglRmhHOQ0TNsYo oTkmMeC3r6L383oRi9vtAe8Zj15oG1I4TOj4CiIv9zlPHIHkqOkJ5u/gzhGHYc6gzQ9hfifG6Q7 q7nbKzU9JKPUb7S6LU6oLJn4ko9jw5AhDMA633l2NfnE3UuoVj2QO3np3YVixLyQ1PWc= X-Received: by 2002:aa7:dd0a:0:b0:44e:a27b:fec with SMTP id i10-20020aa7dd0a000000b0044ea27b0fecmr2070436edv.168.1663836572822; Thu, 22 Sep 2022 01:49:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5L6p+2CY47nRI4vPJrsO2bzG6WRfm+SJ5oa7k8EMLs/NhtV0pcALoOlbSHmpPKBg/KTD6k7w== X-Received: by 2002:aa7:dd0a:0:b0:44e:a27b:fec with SMTP id i10-20020aa7dd0a000000b0044ea27b0fecmr2070420edv.168.1663836572597; Thu, 22 Sep 2022 01:49:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, Eric Blake Subject: [PATCH 04/26] nbd: remove incorrect coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:02 +0200 Message-Id: <20220922084924.201610-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663837244586100001 Content-Type: text/plain; charset="utf-8" nbd_co_establish_connection_cancel() cancels a coroutine but is not called from coroutine context itself, for example in nbd_cancel_in_flight() and in timer callbacks reconnect_delay_timer_cb() and open_timer_cb(). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- include/block/nbd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/nbd.h b/include/block/nbd.h index c74b7a9d2e..4ede3b2bd0 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -424,6 +424,6 @@ QIOChannel *coroutine_fn nbd_co_establish_connection(NBDClientConnection *conn, NBDExportInfo *info, bool blocking, Error **errp); =20 -void coroutine_fn nbd_co_establish_connection_cancel(NBDClientConnection *= conn); +void nbd_co_establish_connection_cancel(NBDClientConnection *conn); =20 #endif --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838536; cv=none; d=zohomail.com; s=zohoarc; b=K+mbtChuHZ8YgHyWzR2qkCQMCOQMecO9qdDEaUfN5WDd7Yfkm5ur4qAGO9VEdMHUBwN/6nos2x/v/t08IGQnOEyZ0Dy/q4ixhDBYpikErMMbEAPuKo/3jge783Zw/Gov5D3x5Qzqtdpppl/DORj9BDKJCuekVzcQQEUMRxXBuyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838536; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aFJ3L77TUFEjwbt4CSDQpeKFnuI2dm866x9il+JnnG4=; b=EUNnwPatKXAUG8wUSNI0uKl1Bf/5ns6P9jywaN/XFzg9aekJUmPEZJTcskx33z5y0Tj9YhwkzouJH0EtEP3h0HFdJIUmQAaa696RTjV+fJuRUz/7r+4+Et9BIxY+UZjoxKKWLPbG90s5XQFfjK8i5xGIwkpPU5GRTQMrSP/hEGU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838536834791.8132961408448; Thu, 22 Sep 2022 02:22:16 -0700 (PDT) Received: from localhost ([::1]:58706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIPM-0004DK-UD for importer@patchew.org; Thu, 22 Sep 2022 05:22:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtq-0004He-UM for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:60907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtp-00039U-Bi for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:38 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-553-keO7TpS-Pvyy6edIEUfAPA-1; Thu, 22 Sep 2022 04:49:35 -0400 Received: by mail-ed1-f72.google.com with SMTP id w20-20020a05640234d400b00450f24c8ca6so6153405edc.13 for ; Thu, 22 Sep 2022 01:49:35 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id z26-20020a170906945a00b0077016f4c6d4sm2308997ejx.55.2022.09.22.01.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aFJ3L77TUFEjwbt4CSDQpeKFnuI2dm866x9il+JnnG4=; b=Ad0ZdpwQwFUMhe/hxzVvhlevviGqMV4KxGpEOJjfDX5FpAfKfZjmS/uzzjJW5lnCA3qG4e qQwE8PXywEBRtx+iXCu806LbVga+IWi5oxN5V2wairk7MpRay9TY3+S2y2ZFrScYyjabA2 Y4i5N+O1mKorhZ8/X+9XSO4MlO5VREA= X-MC-Unique: keO7TpS-Pvyy6edIEUfAPA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=aFJ3L77TUFEjwbt4CSDQpeKFnuI2dm866x9il+JnnG4=; b=CwPifyRrd7Xw1dC5dRGMr6CpFyZkkDGqD2z3T9342mDmt68Fn1WliRdRQWyYvstTo7 DkC2yeHdkTmwWUXCa326PGPb9I4OjLIUL0OVZ0DuEPPb2nSjFW1fTfvQlpQh6fFauOYu 6V6ixOAC2pdSxjM+dulG6EHtcQlFuUmS3f7BJRj1WJxd1s4IE6pHz2x+p62Nxwmg6+wl MC/VHdZSNuj3c+oczcLISD2QKH5SjLDgkXtECAkNPr0VOK8do2EeWxefYMsGDN0RMqok n1mLRFT5p3sV69z/CBdegRF2wu2wsgmxTwKHovOSIdFxhaiU+a/GXVp0jiTcoMYUFQEF 8piw== X-Gm-Message-State: ACrzQf0Vtx3jZpc1MWIkVlM6FnHNIS2Vvup+E3765rGfqAVpGn3qzfd5 1fwJkQxGh/RvpxwoTFWHxhH4j4xOG/mB/lLdzvLoLW2LebOkx96c0/2S8E1aVPxuDphBhPmPYDG 4n6becEk6Ib8aHdDaq9IgMcQpfDNkKymCPuvnkAiexE2lVmKTPj2uTZQUWT0m7Cy1X8g= X-Received: by 2002:a05:6402:2547:b0:450:668c:9d93 with SMTP id l7-20020a056402254700b00450668c9d93mr2208898edb.92.1663836574148; Thu, 22 Sep 2022 01:49:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52fDR1xV3dK4bcx1QCPcgSon0iz4sYkG4s8LPisrLwvUKc3TPAI+cmdzsYYya9YNJRyOojyw== X-Received: by 2002:a05:6402:2547:b0:450:668c:9d93 with SMTP id l7-20020a056402254700b00450668c9d93mr2208868edb.92.1663836573856; Thu, 22 Sep 2022 01:49:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, Eric Blake Subject: [PATCH 05/26] coroutine: remove incorrect coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:03 +0200 Message-Id: <20220922084924.201610-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838539126100001 Content-Type: text/plain; charset="utf-8" qemu_coroutine_get_aio_context inspects a coroutine, but it does not have to be called from the coroutine itself (or from any coroutine). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 2 +- util/qemu-coroutine.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index 08c5bb3c76..e55b36f49a 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -92,7 +92,7 @@ void coroutine_fn qemu_coroutine_yield(void); /** * Get the AioContext of the given coroutine */ -AioContext *coroutine_fn qemu_coroutine_get_aio_context(Coroutine *co); +AioContext *qemu_coroutine_get_aio_context(Coroutine *co); =20 /** * Get the currently executing coroutine diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index 4a8bd63ef0..356b746f0b 100644 --- a/util/qemu-coroutine.c +++ b/util/qemu-coroutine.c @@ -213,7 +213,7 @@ bool qemu_coroutine_entered(Coroutine *co) return co->caller; } =20 -AioContext *coroutine_fn qemu_coroutine_get_aio_context(Coroutine *co) +AioContext *qemu_coroutine_get_aio_context(Coroutine *co) { return co->ctx; } --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663837034; cv=none; d=zohomail.com; s=zohoarc; b=h9bqijIvjDrENJF6iG5x4CnSUJhIXNT+p2I5vEeKk0RcPDadTml/i7mDdpm2kliExNcTnRCkDkECiqo5KZMIkw3qLJalM6OufQUCkZn3bcIsU2cJlUXeDy47MxfvfSrbR/nJPtSc+k7Hn7PnaM665BWEX+DDenBr6poGx6fsnXA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663837034; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CbIXLc2gbhI5SakGYPZOv4I8pwxGWkpOB2ebhFwo8P0=; b=mwVU8nYOUpWymVgXi8GrWXYGvUAM1QNN2RD0AdzMSSvHahW7tEq33mudBYeIdRLBe//mv2w1TDpdi81lKUf0JiAAlB6vAd48/lHkBc5gzymLqlIFpafDpGoOZ44Nq6bw9C+93uIPjXebpjMvOjQhW8dqP3yJ+3TYSz5avwuQj0Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166383703493238.59981753602369; Thu, 22 Sep 2022 01:57:14 -0700 (PDT) Received: from localhost ([::1]:51178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obI1B-0001tV-QP for importer@patchew.org; Thu, 22 Sep 2022 04:57:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtt-0004Hn-FD for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:52736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtr-0003A5-18 for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:41 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-301-NVe6_G5HObW5W9_mZHVp7g-1; Thu, 22 Sep 2022 04:49:37 -0400 Received: by mail-ed1-f69.google.com with SMTP id x5-20020a05640226c500b00451ec193793so6219285edd.16 for ; Thu, 22 Sep 2022 01:49:37 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id fu32-20020a170907b02000b0073d8ad7feeasm2279775ejc.213.2022.09.22.01.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CbIXLc2gbhI5SakGYPZOv4I8pwxGWkpOB2ebhFwo8P0=; b=i4VhH76yoMhUXgbgjlOQNXA1/VB9LQcf8Y97gC8PGh8eMcbERUrhj+6ehPVdaqs4NuEqXe /Onxct02M49IOlx8Nsqtr1o4kYZCHd7NK2EHXHU5e9rxZlK2qisxDjc9eP+QD2Zuo1VXku KQbtKL1wpZvOeHg1rXPzUaZrdqJk5/c= X-MC-Unique: NVe6_G5HObW5W9_mZHVp7g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=CbIXLc2gbhI5SakGYPZOv4I8pwxGWkpOB2ebhFwo8P0=; b=HGJN4CjP+GIGmz1/6uiH5J2z9PiMQTQHvp/o+Vy5fT6oTv/DscMiPPkCclYVkWgzxP 75fJULladVCe90C5ZO8d7l4L5DCXfJRw9Qo6KAUB6WzBoLk1Qz5FGt06RvKa4USyDq8p FyBWhudLFI9GXEBGdkgWWrFLTKBvkQVDc+FeRoJz3iENIdnKVre45tYJAvW1Hfz1g/Oj BQadq43Fw094asoNIQ2fR9JiwS8YUBLFq/Gq9o5C4yTD/9OFVCFU1nSdeLN5MKjqAGPD ocVlh1rDDtx7hQQp7lFwIsjEb/Q8yBQdlrXzTE0baxmdu0K1z5ogj2xkk9NWU0LkiLf0 HUYw== X-Gm-Message-State: ACrzQf0zAFvHyYYb/0QlJju8wobWYrga6TrHHH1jZ8i38FtAcoDke/Ce I9kcHlNLY4/m4nfKC4QLtIAZRN106UEWfxcvrQM+zm5j8WVnZSqpHPwjXC3A45YJu+cOfaRMOv0 /79wHlHe1OvJiMls2MKpYn49yvbuGFuD8aHipMiDo1pPX/LuxCBFoL5Q26pWrZBEhrj8= X-Received: by 2002:a17:906:770d:b0:73c:a08f:593c with SMTP id q13-20020a170906770d00b0073ca08f593cmr1938594ejm.182.1663836575373; Thu, 22 Sep 2022 01:49:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4h65sWl7ToWExHb8IoVZPASibg/h6cFbiQitlPwYuFVQ+Cx2FbOJEZ70LP/REF4+GRoG5Kaw== X-Received: by 2002:a17:906:770d:b0:73c:a08f:593c with SMTP id q13-20020a170906770d00b0073ca08f593cmr1938576ejm.182.1663836575135; Thu, 22 Sep 2022 01:49:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, Eric Blake Subject: [PATCH 06/26] blkdebug: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:04 +0200 Message-Id: <20220922084924.201610-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663837037088100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/blkdebug.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index bbf2948703..a93ba61487 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -587,8 +587,8 @@ out: return ret; } =20 -static int rule_check(BlockDriverState *bs, uint64_t offset, uint64_t byte= s, - BlkdebugIOType iotype) +static int coroutine_fn rule_check(BlockDriverState *bs, uint64_t offset, = uint64_t bytes, + BlkdebugIOType iotype) { BDRVBlkdebugState *s =3D bs->opaque; BlkdebugRule *rule =3D NULL; @@ -672,7 +672,7 @@ blkdebug_co_pwritev(BlockDriverState *bs, int64_t offse= t, int64_t bytes, return bdrv_co_pwritev(bs->file, offset, bytes, qiov, flags); } =20 -static int blkdebug_co_flush(BlockDriverState *bs) +static int coroutine_fn blkdebug_co_flush(BlockDriverState *bs) { int err =3D rule_check(bs, 0, 0, BLKDEBUG_IO_TYPE_FLUSH); =20 @@ -791,7 +791,7 @@ static void blkdebug_close(BlockDriverState *bs) } =20 /* Called with lock held. */ -static void suspend_request(BlockDriverState *bs, BlkdebugRule *rule) +static void coroutine_fn suspend_request(BlockDriverState *bs, BlkdebugRul= e *rule) { BDRVBlkdebugState *s =3D bs->opaque; BlkdebugSuspendedReq *r; @@ -810,8 +810,8 @@ static void suspend_request(BlockDriverState *bs, Blkde= bugRule *rule) } =20 /* Called with lock held. */ -static void process_rule(BlockDriverState *bs, struct BlkdebugRule *rule, - int *action_count, int *new_state) +static void coroutine_fn process_rule(BlockDriverState *bs, struct Blkdebu= gRule *rule, + int *action_count, int *new_state) { BDRVBlkdebugState *s =3D bs->opaque; =20 @@ -840,7 +840,7 @@ static void process_rule(BlockDriverState *bs, struct B= lkdebugRule *rule, } } =20 -static void blkdebug_debug_event(BlockDriverState *bs, BlkdebugEvent event) +static void coroutine_fn blkdebug_debug_event(BlockDriverState *bs, Blkdeb= ugEvent event) { BDRVBlkdebugState *s =3D bs->opaque; struct BlkdebugRule *rule, *next; --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663837643; cv=none; d=zohomail.com; s=zohoarc; b=eyNA1MCH+XvcawpXi9tzL5IwDYt9wTTwqautdeJ77xCC8Z8TosgmJDmN5yyld6rvgfJElz6spLA1iZTC8qv1ndcdWdEr5GO94I6eKaUKtHb0VvW6rlAAQlbHW6iypaetyOxyUuRixLN50IKGP+szgV2vWcPEtnv5lESGZPBv+Cs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663837643; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tJ9IICv8PE6plCAsrPnkp3/CCOC6ITG5IcJpn3oJM/E=; b=Rg/H6gXTtC0MXY/QxJxBZzTpOG8heADgMW8sYMa7U+xId1F37zfR6c54tkni3h6J3JsKL0FCg0GmnsE+UoDHAg06o55PVoZm88cwpQiLwv3Bj4DbIa3LRpTEQqA8s+T+Jq2bSlLnfYVhTs+8kFGNcfPEozC5XvL9ztIsVZApRmk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663837643107981.5824076105489; Thu, 22 Sep 2022 02:07:23 -0700 (PDT) Received: from localhost ([::1]:37354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIAz-00005i-VM for importer@patchew.org; Thu, 22 Sep 2022 05:07:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtu-0004IT-Ok for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:47306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHts-0003AK-Ao for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:42 -0400 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-397-6PXyyQRYPv2OBXDIENq34g-1; Thu, 22 Sep 2022 04:49:38 -0400 Received: by mail-ej1-f69.google.com with SMTP id dm10-20020a170907948a00b00781fa5e140fso2656999ejc.21 for ; Thu, 22 Sep 2022 01:49:38 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id 18-20020a170906309200b0073dc5bb7c32sm2358966ejv.64.2022.09.22.01.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tJ9IICv8PE6plCAsrPnkp3/CCOC6ITG5IcJpn3oJM/E=; b=DHAvE4cgtyrmkXI8PAMigXqGzIX0EXX7CPwFhP383UhEYU4QwzsgeBJNtV64AoaDFQX2YO LXo85O9jmQOAGFFGWncYUmLP0de7PnMNfzQjptuGsj/dVEE5fui9k+sSKOYp7x1EvDGU2v aMqm1UUVnFy20vAAONPHAY647J7nchU= X-MC-Unique: 6PXyyQRYPv2OBXDIENq34g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=tJ9IICv8PE6plCAsrPnkp3/CCOC6ITG5IcJpn3oJM/E=; b=qbdfXu2gn9s+VJxfSKwJ1dMp6Zt99bRGKTj90sXqGPHovZI/DFDXeOzFjQCll5WgBn vMOQFjh5fw4N4jfrDj+VwFMOlGJhTYaZ5ZgEWmi/rkbGI8TDz6syyN4xvt9c96+3NFPv EidVoK19R4wFG/8iAPxo+Mo03LlH7/LA/wyYvmd39kDn/QA+HQtkD/P7LqOmyFNjTj+o oAUZK5KRwkDGz7rDwy1JxvayiVQc4GLotq3m114zp/TpeC6CRFvpwWBdUIonUqfUPVwl OHMQhgIXkTgb7kOBmKB5qkXyyIhy/D+pbAI1XgtE0xFLzqnVO73yJiic4W2w+whDx3HF h8Kw== X-Gm-Message-State: ACrzQf3MxCIZx75Cwf6Zonf3TQ13oEEzhQalujyqdSdJWjn6eU5ILcM1 6bXHTMU5qk45RhkcWjTOgsV7jbpkf56sokreBFFOTRtJQUNIVZkCDU742au3XePJmN0q0RVzUfr FBIPrHdaKhGvcBtkvCunzbA9ebWOKyYKE7683RJLiHpzZd1NJHKEbYeHuzA6jEnsgz70= X-Received: by 2002:a05:6402:11cd:b0:452:199e:7cf6 with SMTP id j13-20020a05640211cd00b00452199e7cf6mr2186472edw.366.1663836577283; Thu, 22 Sep 2022 01:49:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6tJwaoiiZeCKt9gmoe65nMnVxorhIIixTHKEmz9v8mImaxmx+2CAcPlaeJ2D1rMQADHfLUew== X-Received: by 2002:a05:6402:11cd:b0:452:199e:7cf6 with SMTP id j13-20020a05640211cd00b00452199e7cf6mr2186451edw.366.1663836577037; Thu, 22 Sep 2022 01:49:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, Eric Blake Subject: [PATCH 07/26] blkverify: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:05 +0200 Message-Id: <20220922084924.201610-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663837644635100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/blkverify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blkverify.c b/block/blkverify.c index e4a37af3b2..020b1ae7b6 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -258,7 +258,7 @@ blkverify_co_pwritev(BlockDriverState *bs, int64_t offs= et, int64_t bytes, return blkverify_co_prwv(bs, &r, offset, bytes, qiov, qiov, flags, tru= e); } =20 -static int blkverify_co_flush(BlockDriverState *bs) +static int coroutine_fn blkverify_co_flush(BlockDriverState *bs) { BDRVBlkverifyState *s =3D bs->opaque; =20 --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838918; cv=none; d=zohomail.com; s=zohoarc; b=nDQN37VnOAthovJOG9/5APGtWNWHugOlRi8KlpA0YfQBuD/n1ZQYEXKl4ROausHNOf9ROuR8MYQMequN8CtdOXUGfL3A913L67qnKzBA+aM/2H2HW71ddzEzJ8pBQUFUdsM9ScE6ChsG0xO1cwXNKcyHIbaVQMWVy4n5OCB2doo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838918; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iUtq4WXz65nbgH+uLQQjwF/Lwtao8PfLQHIC0ni20pc=; b=OxdNRrxomKiOGHPTWuwm8dmw8P9isd8JaSjUgYzc/xn8MCywaijsMFByvaSdLAJcWH4x/QG4sUxeyUsJWHSRfWDH6XmgaRdNiqnJDM8DRgbzGAuRehSlJ6Uk+qyVBrj+xeSA32FW0XidBpAfv3xaFLOYNZb3cdCdqFpIto58QOk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838918977834.3529411119857; Thu, 22 Sep 2022 02:28:38 -0700 (PDT) Received: from localhost ([::1]:39824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIVZ-0002x8-Cy for importer@patchew.org; Thu, 22 Sep 2022 05:28:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtv-0004Ii-9w for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:34713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtt-0003Ad-Pt for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:43 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-509-q-HjVvYTOw-bDLsxYb50Ow-1; Thu, 22 Sep 2022 04:49:39 -0400 Received: by mail-ed1-f69.google.com with SMTP id r11-20020a05640251cb00b004516feb8c09so6176195edd.10 for ; Thu, 22 Sep 2022 01:49:39 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id el8-20020a056402360800b004533fc582cbsm3207817edb.21.2022.09.22.01.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iUtq4WXz65nbgH+uLQQjwF/Lwtao8PfLQHIC0ni20pc=; b=gcISvu2fEXwIVUKFF6zlucI+Xbw6l6nvnJv4Y9EGTyjgirkRsmlsQtrrlCn4JXFjFhdiFr 1j2vdF7rJCzdD+5bXXNTnzAESPcUDDnAuYNgTgJ31C1VsnEmzEXm/fRRDRWYhQP4PPXCZU bMT2WnJRisfdJxSbFJy9Z5f/1AFhY+Y= X-MC-Unique: q-HjVvYTOw-bDLsxYb50Ow-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=iUtq4WXz65nbgH+uLQQjwF/Lwtao8PfLQHIC0ni20pc=; b=sw7oy2nrr/S2p8zk3xwpLIPuMIWvwbBEptykTC9/8ApHyd1ulWCfqOMVejJOpjXYec SDHTxei0d4CL7p1CZ6MNTW+MO0foZUNTwOc9tCyraRvwIUAMijY+QxKLXOdGVnz8IGhb raLPj26lB0BrBrgebmJsj+8DI0sdBbRDdy9F+gnR7ySiqZMHN97kgJDD3bzC6MvCpVWW JyvKUtazIpsidP8JHi/6AxzO0sHmkj4q5l7RQ5gSOM50OqmWajlbzz/FPOShe/TF5/EY a7pbBFGZCMALxeA4zobVEd7/uzQGDKXfIarOFy+CpvqRpsnPhSP2jvw5aZw0UkSCQLtj Ay9g== X-Gm-Message-State: ACrzQf3Y8KZFrRNjxfoo0qIMbmheNOj4DE0G5rN1fs5QYM01Qy7ysvZI oIU+IXt0X4FQ96KugFHGDp60kIxOFt9P4Nn9DHLyuGkgUCItZN0rvAK4BgM8P3xY+87Ai8jwTXD fwGfMIyX3+P8wnRwTgG+RtrqIWbIggyb8w/Wo+TAWNMEhaxSQSmkifAdG4HBkNao8weA= X-Received: by 2002:a17:907:6ea7:b0:780:840:f050 with SMTP id sh39-20020a1709076ea700b007800840f050mr1877448ejc.394.1663836578533; Thu, 22 Sep 2022 01:49:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6IXV4l8a8lJBFeLOZvRQrDCajLsvtxb85NwPaLWtYSZFVmUNwAMLXGt1P83j6tDvwcBm5ucA== X-Received: by 2002:a17:907:6ea7:b0:780:840:f050 with SMTP id sh39-20020a1709076ea700b007800840f050mr1877435ejc.394.1663836578291; Thu, 22 Sep 2022 01:49:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, Eric Blake Subject: [PATCH 08/26] file-posix: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:06 +0200 Message-Id: <20220922084924.201610-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838919884100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index 48cd096624..76eea8d350 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2158,7 +2158,7 @@ static void raw_aio_unplug(BlockDriverState *bs) #endif } =20 -static int raw_co_flush_to_disk(BlockDriverState *bs) +static int coroutine_fn raw_co_flush_to_disk(BlockDriverState *bs) { BDRVRawState *s =3D bs->opaque; RawPosixAIOData acb; --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838068; cv=none; d=zohomail.com; s=zohoarc; b=YULBCjN5wfjUQZKTWYx2X7SL3ldLexwZehkJgeFYHVLQ0KC0z0sxTV8ci8B6kOCU4rHUMfZ4QyhAzvjbHgPPs/ZW62RubvPBNkgzxKR5i7T8Z9DgaO57VcAIuhIyRGUppEpEZbQveUc72V8HD91ZSGvEkqhvXHuWfXoFhgDSTgw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838068; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gwaSWNYAiuAD3mXFQL3lA7wiv/XLnh3FlGUszdCid5I=; b=BJ6Cu+7yL6U3/nIcwhF+H/L2K7KSz7QqOFcsQlQac6RFJ06vZWgCiP77fKmV3F4kfam+6JOBtV/dtjUTOPqqTn/M7ZfJGpzHS6nOnn4Cdzpr6N8IQFggd/V5z6g65A1OO4ky9BtCmptVzTn8zrC8zRVJeqoVHFDDquUTHIxkdr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838068010566.9916672234938; Thu, 22 Sep 2022 02:14:28 -0700 (PDT) Received: from localhost ([::1]:34424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIHp-00066M-Ur for importer@patchew.org; Thu, 22 Sep 2022 05:14:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHty-0004Le-QJ for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtx-0003BY-AC for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:46 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-446-OCTLUt1GMuO06UoQrMjhKg-1; Thu, 22 Sep 2022 04:49:41 -0400 Received: by mail-ed1-f69.google.com with SMTP id c6-20020a05640227c600b004521382116dso6287180ede.22 for ; Thu, 22 Sep 2022 01:49:41 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id kw12-20020a170907770c00b0076ff600bf2csm2357387ejc.63.2022.09.22.01.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gwaSWNYAiuAD3mXFQL3lA7wiv/XLnh3FlGUszdCid5I=; b=BJBs43f6a8GfHbznhrhs/hGf8/3AbMPhXk1Z3rFLZ5QamH+pHRgcSYYH+to44TcQeM6JjU Jq+wZ0UAWvhVnCw9zvgZeEKdvPAhSdsKzrW6yaeoULQXw5fYC7JV+bInzROnVop/2mVcU0 zdoYeptNarVYqxsNXD1JPPZAVddZAco= X-MC-Unique: OCTLUt1GMuO06UoQrMjhKg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=gwaSWNYAiuAD3mXFQL3lA7wiv/XLnh3FlGUszdCid5I=; b=vn502nHWwTk977etmNxwJ2TK0XqK67aG5Qju6GY4/f5koyPDjvB12fkX5CdNJ5Qooe Vq7g9qffl9qr7DH+b2q7QHim6vAxMICWympD4kKg1SEWu7hjTXarl0HC1W7zVt4zmBe2 jPM1uWM+xTs4kvXdtfnYQ7gY2CzxNUUSsqKDAucJR4EWI21WPOucu2oLJ7gjr35sCBxF v8aHc2RJPfAxuTkxVG1BBWzAA+ZX0Q5GFMhS2guF+eA7l2/e528lH/qez5dYlARcmQIR HqUALcmaqREBBJUWsDBq1nyjwELpvyvSP+WkkcT5BGerxAtcw5WcUzm9Wc4qd2B7yGTr YKag== X-Gm-Message-State: ACrzQf1eM2U7UOfZJbalGDAsdunLu/Lmgwowbwnlff+YFMP+BXwOiozk MPadQ4ZGJU29GwYPfRAE25tbkW6hjAOezSqOE0Kcme9zsE4UL1glg0JJH+ZZ6QuLNvDIMyHzefD J6z1BbpqiY/FhQ5kkEwydtCv/L5pCCysWNK22XwNS0UonzM1xICDDcrQqclilhxju7Bg= X-Received: by 2002:a05:6402:298e:b0:451:129e:1b35 with SMTP id eq14-20020a056402298e00b00451129e1b35mr2135275edb.79.1663836579847; Thu, 22 Sep 2022 01:49:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4g8Isy2RMVMlaJWwcgzMYmJW0kpeTdbIrhC5RQ36qw1pjXmJSZb5oJr+7Vm36lfLcVqi9ROA== X-Received: by 2002:a05:6402:298e:b0:451:129e:1b35 with SMTP id eq14-20020a056402298e00b00451129e1b35mr2135246edb.79.1663836579578; Thu, 22 Sep 2022 01:49:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, Eric Blake Subject: [PATCH 09/26] iscsi: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:07 +0200 Message-Id: <20220922084924.201610-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838068741100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index d707d0b354..b33eeec794 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -290,7 +290,7 @@ iscsi_co_generic_cb(struct iscsi_context *iscsi, int st= atus, } } =20 -static void iscsi_co_init_iscsitask(IscsiLun *iscsilun, struct IscsiTask *= iTask) +static void coroutine_fn iscsi_co_init_iscsitask(IscsiLun *iscsilun, struc= t IscsiTask *iTask) { *iTask =3D (struct IscsiTask) { .co =3D qemu_coroutine_self(), --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838648; cv=none; d=zohomail.com; s=zohoarc; b=kQIJo6bfT2FqpwFov63JV6cGRlfX3Hmc0DgQi0i0kbFHqvUHOueHOae9P+RyBMQlN/rwzYwa6oUusONP4wfgDmBxLEPdERhMgrh7TX2/g1DMYI4KdEPDCJBD7jmkwGyJSFqFnIqWO/QwTsKRQ7PCLf4KixCyAvnsBxVlw7JKaAk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838648; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y70IF9zLzzuGZH6c3R4J73YdmxCLis2lJBd3y27tBwU=; b=LW2obcYU71y0vct+dj4uLpiyzen5ar+unhzAx8xgXsLpkUjd3bGZJsIClyEtkXeb/xlLd2NAtimYwoRG5zHMVU6JhSTxwfnhpi9PQEF9LErDZ5XZgtemMC0joTxhYZ1jpOw0AnYdc99UNl0Cg1pBhYa8Q7CiYh2CLHc27KSyWlY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838648345268.01950672388045; Thu, 22 Sep 2022 02:24:08 -0700 (PDT) Received: from localhost ([::1]:55340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIRD-000556-6U for importer@patchew.org; Thu, 22 Sep 2022 05:24:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu6-0004Rq-Iq for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:47650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu4-0003De-1S for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:54 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-651-eHjPYJbcMZKXHT1_LS83DQ-1; Thu, 22 Sep 2022 04:49:42 -0400 Received: by mail-ed1-f69.google.com with SMTP id w17-20020a056402269100b0045249bc17a9so6161657edd.9 for ; Thu, 22 Sep 2022 01:49:42 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id ay21-20020a056402203500b0044e9601e53fsm3244928edb.19.2022.09.22.01.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y70IF9zLzzuGZH6c3R4J73YdmxCLis2lJBd3y27tBwU=; b=FC143fycPaXgoG/E5kUO6hutiodyaSD4QWSCdlhAQIBbFF0uZ4mby6lPf2HYwfy4XkvxF4 NSwglsj9Og2PeWgw2FF211NXXeH1CiiT8V0YUzU5ohzk17NBvw30xuEyy1yo8877UTMQlk gqZYmzwPbXO42RgXRoJIeii0Qq40K68= X-MC-Unique: eHjPYJbcMZKXHT1_LS83DQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=y70IF9zLzzuGZH6c3R4J73YdmxCLis2lJBd3y27tBwU=; b=jurVEagAL26zxd12FD/9amK4Kq/zLOg9CmmW6E2FMOlXtES+uKBhFiBCM3Tw0kbPfN 8S+zv7Qmx53y55szSpCh+rETbfDWQxpQLDTP9bHp2rawEUhU31qb0DijnZyE/tqaAu5n G+dS0s5hNnUiSQucnyxMC3j9shFkUssV9zpEksAmO29JA6+96x/h7v5bl6LJW+bnAst9 Pa1PDcfIJdZ7/SpX6GRn+DumFnY1mR9ZQSeLEoMzR6N4qrkDtxhDNr0L+K1Qj77rm04s UMRBKK2LTJvaehZLrP6FMpH+RYHMZ+DRRehXuHxzMVpfZUniRqy9OhJQNjdf2R6anOlu XmJw== X-Gm-Message-State: ACrzQf0WL5eh7865XyO7o1a6h42cs7yqsU2XSHQUwUI8kDl9veGPe9gt YMTsg/0Irbe9hk6cvMkWUJ7YnZHxNXRu8kRLSCsrNKfl8uzbFJoJIyE7Ed815idUw72aJQeQ2ae FPeAX9SY26hiTmWh8XkwBcTEvfwQoknIacWU5kKhrkAqMeBJ91zZVIU45Tq8P2RuemYs= X-Received: by 2002:aa7:d054:0:b0:450:f6b9:bc2e with SMTP id n20-20020aa7d054000000b00450f6b9bc2emr2081750edo.413.1663836581433; Thu, 22 Sep 2022 01:49:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4oDkiaTM/8Y7Ykdxo68g/7KEbaW3RG3IVvewCTa+0eAcVz1ZLn/0anMDGjewZQr7GhPP5Ahw== X-Received: by 2002:aa7:d054:0:b0:450:f6b9:bc2e with SMTP id n20-20020aa7d054000000b00450f6b9bc2emr2081732edo.413.1663836581168; Thu, 22 Sep 2022 01:49:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, Eric Blake Subject: [PATCH 10/26] nbd: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:08 +0200 Message-Id: <20220922084924.201610-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838649622100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/nbd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 97683cce27..786ee79013 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -983,11 +983,11 @@ static void nbd_iter_request_error(NBDReplyChunkIter = *iter, int ret) * nbd_reply_chunk_iter_receive * The pointer stored in @payload requires g_free() to free it. */ -static bool nbd_reply_chunk_iter_receive(BDRVNBDState *s, - NBDReplyChunkIter *iter, - uint64_t handle, - QEMUIOVector *qiov, NBDReply *rep= ly, - void **payload) +static bool coroutine_fn nbd_reply_chunk_iter_receive(BDRVNBDState *s, + NBDReplyChunkIter *i= ter, + uint64_t handle, + QEMUIOVector *qiov, = NBDReply *reply, + void **payload) { int ret, request_ret; NBDReply local_reply; --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838098; cv=none; d=zohomail.com; s=zohoarc; b=BBIzykPc41aGqXvxEvBrUP2V/+ILRwhJ+gN74FGDIVU3xC1B3THbcRtukhZFJcZ6Lk5vY7qx993IeTEee9eQt+BcWdKj6/2HS9LcC52d+/3lbkougTezliCtl4sPfc7N/1SK9vHaBt1191AEaroUCPBphsXjUo6JXvyy++GsQF4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838098; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=W3MW9mE1BsL5Mv0gGMFT3yEiQ6jzCGv4PL3FWaPSfgc=; b=MquzZwuSIYx/RWX2lL0W1CDQ7Mvt3L7G1VS48Y/J5jkknSk16OodPyqJDH9i1ipIclsWGPxa6bxRmKwuh4+IxVT3I93EcUTX6PlltwNm3f7h4rwEw4fr8YmUVnRk4sKTFpZWcw+H9Fe4r7bppah60YHyBFFH6bFNM6CJfpwFwr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838098127960.7354584151867; Thu, 22 Sep 2022 02:14:58 -0700 (PDT) Received: from localhost ([::1]:42884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIIJ-0006cO-RH for importer@patchew.org; Thu, 22 Sep 2022 05:14:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtz-0004MM-SX for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:38645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHty-0003Bh-1H for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:47 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-661-SJQnTElhMRK9OYElqSJZyA-1; Thu, 22 Sep 2022 04:49:44 -0400 Received: by mail-ed1-f70.google.com with SMTP id w17-20020a056402269100b0045249bc17a9so6161709edd.9 for ; Thu, 22 Sep 2022 01:49:44 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id jt2-20020a170906dfc200b007417041fb2bsm2296185ejc.116.2022.09.22.01.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W3MW9mE1BsL5Mv0gGMFT3yEiQ6jzCGv4PL3FWaPSfgc=; b=g73EZTINMp1CeoYWkiO6rn6WwkBvWrIhMs1CikNsDVRNVpWuE2EUpR3wKJrekPD54jjlQS 9TwuN3l6RIKEvnv3WylO3I3JzGaUQebgN/rH1TOgNLVLLZuxjGiJaIOiH/He+hTAlodB60 frJbwP3ID532FbA5pEe7EXfgj/nz6JY= X-MC-Unique: SJQnTElhMRK9OYElqSJZyA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=W3MW9mE1BsL5Mv0gGMFT3yEiQ6jzCGv4PL3FWaPSfgc=; b=g+7Y8pfVAKoQ1UDgcN78VBcI8pWYSMqAT+LCn7Wc2F4jlEeZ0WiIU03A+6Sb6mCJjd 8F3pqfMvlUYVBkc78y48VVYY+cs8y7WmuqxHXciUz6ICtGjeSfJq0QifotHRhUZ4Q33U icacpfWm+nqYey6GMVjm0bVLHnxi2SDEr5uedpbBzkInMFKZiP2KMpH01BHBMix1dT2i C/VTEj83zjhJn1cruEgodOKLK/gtAz0OzJFQgq813RG6UbGkdN6P9Wm0QNQ/EQDvXWcT 1kDGX7HaH53POW2gAhjUEvPzX+3NVzOIdL9jU/5Sv3c4GVmCTg1ZgBl++8C6Thda3i1w EJXw== X-Gm-Message-State: ACrzQf3J08nKFc6N+zbqQ9Vr7MnUco6CNpLfxaZrWhTCjWzWOXuDVVo+ 197FEpm4sI/64+b8LmS6OyMdRgSK2CrVdactNd9wrzOXFmIiuQOeGPGhcwKFq8vk0GnJqsz+Ga8 OVYFSWRMcOAN/RxHWZajmjBcRxeHwqYNuoX4of0vTsbnnpr0ep1gHHdcBFZw3/1762BQ= X-Received: by 2002:a17:907:5c5:b0:77d:ea1:44c with SMTP id wg5-20020a17090705c500b0077d0ea1044cmr1841987ejb.305.1663836582982; Thu, 22 Sep 2022 01:49:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7DgKX8CxTLbRutSjzj29qCiCti05pgQ74vQokN5is5cNGoB9K7wDFDnXOQzRRyWJvN15F+bQ== X-Received: by 2002:a17:907:5c5:b0:77d:ea1:44c with SMTP id wg5-20020a17090705c500b0077d0ea1044cmr1841974ejb.305.1663836582700; Thu, 22 Sep 2022 01:49:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 11/26] nfs: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:09 +0200 Message-Id: <20220922084924.201610-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838098879100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nfs.c b/block/nfs.c index 444c40b458..596ebe98cb 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -223,7 +223,7 @@ static void nfs_process_write(void *arg) qemu_mutex_unlock(&client->mutex); } =20 -static void nfs_co_init_task(BlockDriverState *bs, NFSRPC *task) +static void coroutine_fn nfs_co_init_task(BlockDriverState *bs, NFSRPC *ta= sk) { *task =3D (NFSRPC) { .co =3D qemu_coroutine_self(), --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663837920; cv=none; d=zohomail.com; s=zohoarc; b=nxIkiQDWuL54WEM4WUjifGfe+zYNeFL6DZ8gBafzPZ+vFoWMnXSaR9/oSxVPHHLsUVBAKlqHdF9qVCMlHsSZdpfGaj1N0gJPe9ZSuYvd8k59LsVwFcDENZYt7kUw22w+Wt8Rl8jNgVBf7rt6uEJ7nVs+ehwg5ufooep3ywbww78= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663837920; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sAFAs4hAiiPiiYyIOLDT0XHpVnfH9R+UM/N5QubwJIk=; b=KbmshLfEbmr9+fpUVCCo5msuxNlhMZ7Q03SvheHQku/2QkhKuyi07BQqjKurUS9p4QolbJqawzOdJToCYt8GNZSl+jKGFsaz9t4n2r7+Mnf9fZLMo/eEq7U/Pu+DcFrvbXF+Zjzq1p4AHerVmdXv8naJAzAOXDvYZVac5cYC3yo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663837920327617.8431059501409; Thu, 22 Sep 2022 02:12:00 -0700 (PDT) Received: from localhost ([::1]:52542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIFT-0002C4-6A for importer@patchew.org; Thu, 22 Sep 2022 05:11:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu1-0004MU-5x for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:45377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHtz-0003CM-Lv for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:48 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-67-iHre37S8PaCZVxm9QYk-4A-1; Thu, 22 Sep 2022 04:49:45 -0400 Received: by mail-ed1-f69.google.com with SMTP id w20-20020a05640234d400b00450f24c8ca6so6153724edc.13 for ; Thu, 22 Sep 2022 01:49:45 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id el8-20020a056402360800b004533fc582cbsm3207944edb.21.2022.09.22.01.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sAFAs4hAiiPiiYyIOLDT0XHpVnfH9R+UM/N5QubwJIk=; b=P6w1vGziEdPGUXI8SgV73eruaeqeUyzghi44P4quY672/PdvuIoVkZ/CUXHkbzcoW/9D+b BYHk9R1KfsOPjdNHBbtTOQYOZXfIPSNPADtbLuCUXcvazGmLfHPlD94ooBnjzG0NCdM/Qy Y4Sm7Z8tXUea/szRq3jtU0dPJJpnP4E= X-MC-Unique: iHre37S8PaCZVxm9QYk-4A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=sAFAs4hAiiPiiYyIOLDT0XHpVnfH9R+UM/N5QubwJIk=; b=6w1Ejg/rsV8+hLNdy5444FyvAol7IqfjgFGGtDvi7rEpXbdarrEwK85sycIkuvtN0B s++0x/jqACKCvzfXXtaTGIkIOW3nXI4EltzErgpbNa6iJWXpK/9G7KG/Mr2Xqpq5JwxK nbBJb0BTYLpDgsaBJdB4wpJ3MQx/7zpkUhFdY4pHv2ZP/A6tPCOokEYnNxBAlZjfdtJK v5CtjUStNYD+VRb9wMCxtHikm4kqP5u8bzfjRX6dv7P115xkgBIzbTBphLktHOtz+All 3FnKflXoQM6XOV+7S4Q0J1CBbXpx5pBnO5U4NjY4SaM6+GX7ipMzXJUuVFdpGR0PiqTn uOUA== X-Gm-Message-State: ACrzQf3/m4KmSesDd7mi8G2UtEq4lBHYiNpEZEGRccNqcr9seHN35Dul jNHrlu0GmgCbxtf4D4SlQd39V8nlfolP7t9y/t6j6mWlKWQAMijlz6F0x0el1P1SMCBmj5ails/ gCs0XG33H5CuSYnukh/6DgwndPeIpJRh3Dr8b2jESti89XtFUq8i76/zwzwWvMy+XoJk= X-Received: by 2002:a17:907:62a1:b0:781:b320:90c0 with SMTP id nd33-20020a17090762a100b00781b32090c0mr1759344ejc.255.1663836584252; Thu, 22 Sep 2022 01:49:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ghzK16tMiaf1ZWvoOA5nAvB3y+8sLo34wX1L9Dla1Qa/ejWwfYALLYp3FeGgVsTsHasgzJw== X-Received: by 2002:a17:907:62a1:b0:781:b320:90c0 with SMTP id nd33-20020a17090762a100b00781b32090c0mr1759321ejc.255.1663836584001; Thu, 22 Sep 2022 01:49:44 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 12/26] nvme: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:10 +0200 Message-Id: <20220922084924.201610-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663837922001100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/nvme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index 3e6abef1ce..c51b9f5cd3 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -1242,8 +1242,9 @@ static inline bool nvme_qiov_aligned(BlockDriverState= *bs, return true; } =20 -static int nvme_co_prw(BlockDriverState *bs, uint64_t offset, uint64_t byt= es, - QEMUIOVector *qiov, bool is_write, int flags) +static coroutine_fn int nvme_co_prw(BlockDriverState *bs, + uint64_t offset, uint64_t bytes, + QEMUIOVector *qiov, bool is_write, int flags) { BDRVNVMeState *s =3D bs->opaque; int r; --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663839442; cv=none; d=zohomail.com; s=zohoarc; b=GKpLvcWU0c5S3t9i8GAhHDYKmVXzmr8JZf9qpsLJDBDTRNeWRGbitj7ibvzStL1EO4hWKQWKwqgAdbw2+0eDbBaqWpnXKOYT2CTP+hT4Cdh3NwUPtnqDza/DtBS975NP7/0WaHARJmM5jSZN8eE9GAsLmsmYPWl+ueLemPIG2/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663839442; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FoMhUiiW46hHU/7ueBXGLOXJdUNOszC/FunOU7fBMmo=; b=O+zT6DdA1P3rma9BZ/ZEh3lSu2kkuFXSgybubtt/+77gRHaxQelLprr4+jAX0RCX5RI7kCfuI1ZzPSClFeEcmjlt7UtrZr9UmnJtR/O/NFYnrKZIxoKnDQ0dpJqhHXloGq0/YOZcJRsEc4aw7uO4XSU/hfy9od6l0kTtE7+slRU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663839442321879.7892772524328; Thu, 22 Sep 2022 02:37:22 -0700 (PDT) Received: from localhost ([::1]:43352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIe1-0000iG-38 for importer@patchew.org; Thu, 22 Sep 2022 05:37:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu2-0004Mp-CK for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu0-0003Cf-OC for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:49 -0400 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-178-McvT4AwOMCesX4CRIT95Qg-1; Thu, 22 Sep 2022 04:49:47 -0400 Received: by mail-ej1-f69.google.com with SMTP id dt13-20020a170907728d00b007825956d979so427700ejc.15 for ; Thu, 22 Sep 2022 01:49:46 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id n26-20020aa7c45a000000b00452ff2c203asm3277956edr.92.2022.09.22.01.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FoMhUiiW46hHU/7ueBXGLOXJdUNOszC/FunOU7fBMmo=; b=CDusB1wYf8FXUK6MUnpnNTZgEj+aF6COFTG1oS4UIHmhLYKJ7bgB5rcpqzwqetVIbJTs76 i+eIs4wGS6oCjKd2X4PG/FQhfGf3q+zE0je8lPBHuLIMW4+ov4UDdUwmivmCEKbDzg/OA4 eS8vEYJ4tI6x1YHaZWLOlWZMzvFE070= X-MC-Unique: McvT4AwOMCesX4CRIT95Qg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=FoMhUiiW46hHU/7ueBXGLOXJdUNOszC/FunOU7fBMmo=; b=lkvopf1yJ/rjceUAybjp8XytOC/lwSukSmubvVB3lBhPH43rLrc9XW3F+UeZr6paCi MXepbq87JQg4cfNJbjVpMlWUq0Bkf0kxFvGfX0zWSsumV0Eixfg61CnlqE9cDbyGlanw bTP1trQjdYJZJgVEHo51+Nc+kxmNIRZ60NhikNfO7XB4yf4igkvXWcyfyAhPT+VQfey6 dIe+v0bEUpLMjp9q/LQpIAQFi7OkJ+DjHKUkR7tTJ5z06ppXznjpUbuDf4lxc80/4uZg oRBVdKhLcStHPSY9JiQlHBZXWG8eYk6ej4d7kl83CBiEXntbKxXA/gy7MGO8O5ZY5918 9QXw== X-Gm-Message-State: ACrzQf3pN+VSAMpehaFnHLF4yqxAGJdAa6TP5SmxH8PmJqXmDl5OZ0aF dyK9acMRDgGBXXp87dGLAx9j9mmGjMDoIHpqgnfp+mfh/DpVLbKo4er3QJVb1z7v+xCV0BT1G1E Ch78OifHqer0J1zasATEny8RjrpY6W/YjBLW0oMuKjcMmZFC2IjAXtSMPI57hU3t1s6U= X-Received: by 2002:a17:906:db03:b0:741:337e:3600 with SMTP id xj3-20020a170906db0300b00741337e3600mr1870129ejb.343.1663836585590; Thu, 22 Sep 2022 01:49:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jEiBJbBamSXVIERtfq8mlZ9To10j3RTH3DnM4Otq8FUiHiazXBTY4j/Yu0s2i7h2BGc2r9A== X-Received: by 2002:a17:906:db03:b0:741:337e:3600 with SMTP id xj3-20020a170906db0300b00741337e3600mr1870110ejb.343.1663836585306; Thu, 22 Sep 2022 01:49:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 13/26] parallels: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:11 +0200 Message-Id: <20220922084924.201610-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663839443086100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/parallels.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index a229c06f25..5fc726f446 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -165,8 +165,9 @@ static int64_t block_status(BDRVParallelsState *s, int6= 4_t sector_num, return start_off; } =20 -static int64_t allocate_clusters(BlockDriverState *bs, int64_t sector_num, - int nb_sectors, int *pnum) +static coroutine_fn int64_t allocate_clusters(BlockDriverState *bs, + int64_t sector_num, + int nb_sectors, int *pnum) { int ret =3D 0; BDRVParallelsState *s =3D bs->opaque; --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663839887; cv=none; d=zohomail.com; s=zohoarc; b=e2SB3/rB7TZ005S1/vZD1zBzHKs+CdzjuMkUvBtjszBghn2sFB2HefWwJYoY+wNyV3ZWFjAp6dpZtPru406xdbc+YDw/ii+LfRxxvQV6ajyQ+8cA2ZxoKfV/FVyRfE/ZBgIz7XqtgrXez5UTwlM6KARpsXNH5Hk3tu19V06IQf0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663839887; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=z170oJoKSKZDpg7rTxvcQkX8GrHO+LozmHjN9GFYeEU=; b=iEaDCyIEHxJgELKewP8fxT0pwrDm10KJE3f4CrU332uQXs282Pp2QRB4KFWxb075Bmx1iCmldiBJHoqN+33roXQParHS1DgZ8wy4kReL/gG8Gcwix0i6iAtcpjp4C+NlfLvgg/gjP0pEQyje45UrkWswpWcd/JpjbMewytCdJmo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663839887368699.4753343964459; Thu, 22 Sep 2022 02:44:47 -0700 (PDT) Received: from localhost ([::1]:39254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIlC-0007Wo-9p for importer@patchew.org; Thu, 22 Sep 2022 05:44:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu6-0004SB-UZ for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu5-0003Dx-4C for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:54 -0400 Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-110-R3QSiDPBPTCDKl4zTfvCMQ-1; Thu, 22 Sep 2022 04:49:48 -0400 Received: by mail-ej1-f70.google.com with SMTP id qb30-20020a1709077e9e00b0077d1271283eso4142890ejc.2 for ; Thu, 22 Sep 2022 01:49:48 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id b21-20020a17090630d500b0071cef6c53aesm2356943ejb.0.2022.09.22.01.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z170oJoKSKZDpg7rTxvcQkX8GrHO+LozmHjN9GFYeEU=; b=JrQ6P6dXE9GSwMMNstnwADglOhCXq+GjuCbCTlDLENxb2+dKSJMQlKbkEYgoqSiCKxGCse 16/U60PSLfQcxB7Mz4Vv8OCTA1AJlSEmikVlAnuBUfbaC98WdcBEYWBXNhXprmdocqLktR LYVFtAEZGBeBosaTHDMfVRYvIvKgfG0= X-MC-Unique: R3QSiDPBPTCDKl4zTfvCMQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=z170oJoKSKZDpg7rTxvcQkX8GrHO+LozmHjN9GFYeEU=; b=wWWR/EXgeW5T6rs8qq/XCd+rIqmXvR4MNOZERue99SSaRX8ksU23SrMZ3fBDeacg6U 2fmHQ3NpuQH//QWNuUms7RfAB+AHG/p4ZJnxbJ1bHq1eJ8pyFsA/bYyDDhgR5pHa3kvX VaVWVtt7V/FDEFiNgKJ2nFEQy0s0r9XkFL3LicBjAzpfHU/WSqbYtSqT6VO1mUtaknro 0AX0qi4NMS3gdVrOgBdvB4+6OOG1W3MFoNl7YDjsZYmOVnwOyMrDySqRt3TOc/T6bAQW UxZ2Onqfgopb9EzY0DW5eehXQWggQZTpAkC4iZoS7Xtog1rX+4TucT7x5uHD2t2VLWlI g9ow== X-Gm-Message-State: ACrzQf2S2iJ5c63fKkenSQQOxg+fey7g1oxeMrC5wUNxnCBLR30BpS// eZGgAvWnPQDkXFgQuMx8AQRfz+ZQzParoLZ26kTCcwf3T4eVyauagcm+mq5wgnPzYAwuOsV0qh0 34DnC0K2lxPOHka2MQtQGjl6AgOb7qcMToAA0OFak2Ruc+fx8+PWBLfFlenxv3Q+nqig= X-Received: by 2002:aa7:c849:0:b0:453:9543:6ef3 with SMTP id g9-20020aa7c849000000b0045395436ef3mr2165288edt.105.1663836586920; Thu, 22 Sep 2022 01:49:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Ano8/YtlsfI/MjgIvxdBNgYwYzmOYSuluImiPTRUp44OOmcj+0J+r7iDuczBZS5o+5s1tlg== X-Received: by 2002:aa7:c849:0:b0:453:9543:6ef3 with SMTP id g9-20020aa7c849000000b0045395436ef3mr2165260edt.105.1663836586644; Thu, 22 Sep 2022 01:49:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 14/26] qcow2: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:12 +0200 Message-Id: <20220922084924.201610-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663839888044100005 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qcow2-cluster.c | 18 +++++++++--------- block/qcow2-refcount.c | 2 +- block/qcow2.c | 4 ++-- block/qcow2.h | 14 +++++++------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index fd32316d6f..f6a12ed510 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -884,7 +884,7 @@ int qcow2_alloc_compressed_cluster_offset(BlockDriverSt= ate *bs, return 0; } =20 -static int perform_cow(BlockDriverState *bs, QCowL2Meta *m) +static int coroutine_fn perform_cow(BlockDriverState *bs, QCowL2Meta *m) { BDRVQcow2State *s =3D bs->opaque; Qcow2COWRegion *start =3D &m->cow_start; @@ -1024,7 +1024,7 @@ fail: return ret; } =20 -int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m) +int coroutine_fn qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2M= eta *m) { BDRVQcow2State *s =3D bs->opaque; int i, j =3D 0, l2_index, ret; @@ -1397,8 +1397,8 @@ static int count_single_write_clusters(BlockDriverSta= te *bs, int nb_clusters, * information on cluster allocation may be invalid now. The cal= ler * must start over anyway, so consider *cur_bytes undefined. */ -static int handle_dependencies(BlockDriverState *bs, uint64_t guest_offset, - uint64_t *cur_bytes, QCowL2Meta **m) +static int coroutine_fn handle_dependencies(BlockDriverState *bs, uint64_t= guest_offset, + uint64_t *cur_bytes, QCowL2Met= a **m) { BDRVQcow2State *s =3D bs->opaque; QCowL2Meta *old_alloc; @@ -1772,9 +1772,9 @@ out: * * Return 0 on success and -errno in error cases */ -int qcow2_alloc_host_offset(BlockDriverState *bs, uint64_t offset, - unsigned int *bytes, uint64_t *host_offset, - QCowL2Meta **m) +int coroutine_fn qcow2_alloc_host_offset(BlockDriverState *bs, uint64_t of= fset, + unsigned int *bytes, uint64_t *ho= st_offset, + QCowL2Meta **m) { BDRVQcow2State *s =3D bs->opaque; uint64_t start, remaining; @@ -2105,8 +2105,8 @@ out: return ret; } =20 -int qcow2_subcluster_zeroize(BlockDriverState *bs, uint64_t offset, - uint64_t bytes, int flags) +int coroutine_fn qcow2_subcluster_zeroize(BlockDriverState *bs, uint64_t o= ffset, + uint64_t bytes, int flags) { BDRVQcow2State *s =3D bs->opaque; uint64_t end_offset =3D offset + bytes; diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 1a6277c783..1fbb07ca77 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -3706,7 +3706,7 @@ int64_t qcow2_get_last_cluster(BlockDriverState *bs, = int64_t size) return -EIO; } =20 -int qcow2_detect_metadata_preallocation(BlockDriverState *bs) +int coroutine_fn qcow2_detect_metadata_preallocation(BlockDriverState *bs) { BDRVQcow2State *s =3D bs->opaque; int64_t i, end_cluster, cluster_count =3D 0, threshold; diff --git a/block/qcow2.c b/block/qcow2.c index c6c6692fb7..b4d04e91fa 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2436,7 +2436,7 @@ static bool merge_cow(uint64_t offset, unsigned bytes, * Return 1 if the COW regions read as zeroes, 0 if not, < 0 on error. * Note that returning 0 does not guarantee non-zero data. */ -static int is_zero_cow(BlockDriverState *bs, QCowL2Meta *m) +static int coroutine_fn is_zero_cow(BlockDriverState *bs, QCowL2Meta *m) { /* * This check is designed for optimization shortcut so it must be @@ -2454,7 +2454,7 @@ static int is_zero_cow(BlockDriverState *bs, QCowL2Me= ta *m) m->cow_end.nb_bytes); } =20 -static int handle_alloc_space(BlockDriverState *bs, QCowL2Meta *l2meta) +static int coroutine_fn handle_alloc_space(BlockDriverState *bs, QCowL2Met= a *l2meta) { BDRVQcow2State *s =3D bs->opaque; QCowL2Meta *m; diff --git a/block/qcow2.h b/block/qcow2.h index c8d9e8ea79..36495d9051 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -895,7 +895,7 @@ int qcow2_change_refcount_order(BlockDriverState *bs, i= nt refcount_order, void *cb_opaque, Error **errp); int qcow2_shrink_reftable(BlockDriverState *bs); int64_t qcow2_get_last_cluster(BlockDriverState *bs, int64_t size); -int qcow2_detect_metadata_preallocation(BlockDriverState *bs); +int coroutine_fn qcow2_detect_metadata_preallocation(BlockDriverState *bs); =20 /* qcow2-cluster.c functions */ int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size, @@ -908,9 +908,9 @@ int qcow2_encrypt_sectors(BDRVQcow2State *s, int64_t se= ctor_num, int qcow2_get_host_offset(BlockDriverState *bs, uint64_t offset, unsigned int *bytes, uint64_t *host_offset, QCow2SubclusterType *subcluster_type); -int qcow2_alloc_host_offset(BlockDriverState *bs, uint64_t offset, - unsigned int *bytes, uint64_t *host_offset, - QCowL2Meta **m); +int coroutine_fn qcow2_alloc_host_offset(BlockDriverState *bs, uint64_t of= fset, + unsigned int *bytes, uint64_t *ho= st_offset, + QCowL2Meta **m); int qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs, uint64_t offset, int compressed_size, @@ -918,13 +918,13 @@ int qcow2_alloc_compressed_cluster_offset(BlockDriver= State *bs, void qcow2_parse_compressed_l2_entry(BlockDriverState *bs, uint64_t l2_ent= ry, uint64_t *coffset, int *csize); =20 -int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m); +int coroutine_fn qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2M= eta *m); void qcow2_alloc_cluster_abort(BlockDriverState *bs, QCowL2Meta *m); int qcow2_cluster_discard(BlockDriverState *bs, uint64_t offset, uint64_t bytes, enum qcow2_discard_type type, bool full_discard); -int qcow2_subcluster_zeroize(BlockDriverState *bs, uint64_t offset, - uint64_t bytes, int flags); +int coroutine_fn qcow2_subcluster_zeroize(BlockDriverState *bs, uint64_t o= ffset, + uint64_t bytes, int flags); =20 int qcow2_expand_zero_clusters(BlockDriverState *bs, BlockDriverAmendStatusCB *status_cb, --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838581; cv=none; d=zohomail.com; s=zohoarc; b=KycQ+baYWIKakvudsFl1rKsPo16FyZxjk0YkWgDf5T3gDYKqk9lElaCn7uv1nmEhGWRjvbi5xdVrorSdr9wdMD8nypfVDaygM3kIaG5Q49hDgCHtbUH5m6x6vksBuLI8dwtXQKPKL6bXQeRty40n/6DPtvE1/STJCPSRNY+zsRQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838581; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UzS2L37BHSdIkyL6Vc6S10N2Cgc3pQRU3RHr2iDDn0Y=; b=QXUfg2gq9TmcdTIeLoL3Bg67mRfbh6B/jh4O+XEbXVJy3MDIu9WgxqfmHwJ1bakDu7ZoOazwf1GWY69YcWL9yoEvu5aNtKAZRp6VqD394SBGzkcMgyEnoMlmS1e4lj4/N9EaMpcPzTVQWJk/Uol6+rBglVfuoG91bYbpx8wapsw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166383858154963.73475747600639; Thu, 22 Sep 2022 02:23:01 -0700 (PDT) Received: from localhost ([::1]:47352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIQ7-0004PV-GT for importer@patchew.org; Thu, 22 Sep 2022 05:22:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu6-0004RU-B8 for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:39895) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu3-0003DQ-LQ for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:53 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-381-Q_Sa2p4OPGy435tZbPdGCw-1; Thu, 22 Sep 2022 04:49:49 -0400 Received: by mail-ed1-f69.google.com with SMTP id b16-20020a056402279000b0044f1102e6e2so6318953ede.20 for ; Thu, 22 Sep 2022 01:49:49 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id i23-20020a50d757000000b004479cec6496sm3315629edj.75.2022.09.22.01.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UzS2L37BHSdIkyL6Vc6S10N2Cgc3pQRU3RHr2iDDn0Y=; b=Wc3nJKyUKaYBYbHfGq8zRDrjs7x+a9UxCkY7z/o1KcUrEVrbfxAblCTb2DH8gESDwWEbh5 o7Dp2OnoqrNi8ryb/2k6JlFcac6rnRvjrT6zLyr9GW46MF3WsZ9xjDYAEfus7U9O4K5/zO xAvhFhawcdF1Jj0IBnn3bW0p0nKF15w= X-MC-Unique: Q_Sa2p4OPGy435tZbPdGCw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=UzS2L37BHSdIkyL6Vc6S10N2Cgc3pQRU3RHr2iDDn0Y=; b=GXBFoA9mbk10tTUktdNZBjBSdsHHD4heyuy8sVL3uf4aJNRhyxGV19OZsNOpHmh0qv dIeRxaytdTPGO2QUVgC0AP/wwo3snC1q1CpVCNnuMCJqsxANqBD1efyqTvPfaJxtTuyD D2JQMI4vJEBLiGgkcVFakFR3XgTWlWZuHjLWBimtmxEExEGby3C6DJ+2M4kHtc9Y5A/h A0dUyhr29i51K5PdyuVHfAbxFENl+KrXLpn1WXz9zIP3j5+I/O81uz/61OMLmLwd44QV 7bgviWQygN86R3HVDxlshbCVVwaxq1FF7cRBNY+9vdU6WW/I0ieHUYlUnY6GeyeE2KSF PJxQ== X-Gm-Message-State: ACrzQf3uVfXZmxvkU8HhKahwO/PxDF1rOVA+GIZkZtGh6xGaLzo2mlcE piU6brwjsBJriEFtoFTizrG7TtWWgW+pwwXuMJa7iUE7GQknmqAZQVxDP92oN0J+W5YccAcbiEM BhilnQ2gA2uLXtH88jnzCei5q+2y3FMlSLJ3sdjaX1b3e5yZFKIpiNgSRhkNEnYfqk5I= X-Received: by 2002:a17:906:8a7b:b0:781:8016:2de1 with SMTP id hy27-20020a1709068a7b00b0078180162de1mr1871120ejc.54.1663836588528; Thu, 22 Sep 2022 01:49:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4sOWsV1VNzOM8Hh1YyXR0Xl6Ux2ORyugyl8PQW0TmHa8BR2w6VrsNgI+nOYgbIBHRvp18wtQ== X-Received: by 2002:a17:906:8a7b:b0:781:8016:2de1 with SMTP id hy27-20020a1709068a7b00b0078180162de1mr1871099ejc.54.1663836588279; Thu, 22 Sep 2022 01:49:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 15/26] copy-before-write: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:13 +0200 Message-Id: <20220922084924.201610-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838583455100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/copy-before-write.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/copy-before-write.c b/block/copy-before-write.c index c24b8dd117..14af7eb753 100644 --- a/block/copy-before-write.c +++ b/block/copy-before-write.c @@ -203,9 +203,9 @@ static int coroutine_fn cbw_co_flush(BlockDriverState *= bs) * It's guaranteed that guest writes will not interact in the region until * cbw_snapshot_read_unlock() called. */ -static BlockReq *cbw_snapshot_read_lock(BlockDriverState *bs, - int64_t offset, int64_t bytes, - int64_t *pnum, BdrvChild **file) +static coroutine_fn BlockReq *cbw_snapshot_read_lock(BlockDriverState *bs, + int64_t offset, int64= _t bytes, + int64_t *pnum, BdrvCh= ild **file) { BDRVCopyBeforeWriteState *s =3D bs->opaque; BlockReq *req =3D g_new(BlockReq, 1); @@ -240,7 +240,7 @@ static BlockReq *cbw_snapshot_read_lock(BlockDriverStat= e *bs, return req; } =20 -static void cbw_snapshot_read_unlock(BlockDriverState *bs, BlockReq *req) +static coroutine_fn void cbw_snapshot_read_unlock(BlockDriverState *bs, Bl= ockReq *req) { BDRVCopyBeforeWriteState *s =3D bs->opaque; =20 --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838927; cv=none; d=zohomail.com; s=zohoarc; b=fB43VWgc+aw9QmWK8dXkSNSVHnyem4At5Ubh+tNiAvBAGC/nR6lsrXj8rC3cDLHTd1LT7XWSb9M42rQvxN9BEj8p5ODJ6f44DOsqtIbDXSI9erLWbswsT0CVTHNv3UoUaVfQZQ8tiwmY9SciZMV7mBi3aR/zM+fu6T47YLLOink= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838927; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=O6AXzgGtdYWeMtnt6YWtXqyOu/JX+5LJAyvz2m6ZVtw=; b=APkyNMY54OESuotFXKHjxGHXsn6uKY55hJaiuVLbk+w4Qkbm2boUclDPEC7ZHt8N4HpOMef8xdSt7e0Lv6t2wlRfsYdUDHT9eWJuPLp8hCokiwxo7SPOQj5O7NZbsAvWnBxVrzFPJg9nxqo9+ZBl+LxbHnFUX001AB3lArTUjFw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838927448660.6564330279145; Thu, 22 Sep 2022 02:28:47 -0700 (PDT) Received: from localhost ([::1]:41670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIVi-0003Am-7D for importer@patchew.org; Thu, 22 Sep 2022 05:28:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu7-0004SH-LQ for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:25463) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu6-0003EG-0T for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:55 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-486-rNUxlVKuMEaSRs2x9TugKg-1; Thu, 22 Sep 2022 04:49:51 -0400 Received: by mail-ed1-f70.google.com with SMTP id z2-20020a056402274200b004516734e755so6178010edd.3 for ; Thu, 22 Sep 2022 01:49:50 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id kv6-20020a17090778c600b0076f0ab594e9sm2323852ejc.73.2022.09.22.01.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O6AXzgGtdYWeMtnt6YWtXqyOu/JX+5LJAyvz2m6ZVtw=; b=LxDcNyuXQysMie9xV+2JLP76FKRUd6HR5oCgdTPId/kGQQAbcj6FJHujW0BvQxSeJmeQRy LIEcg/QY6b7hb/IZ0s2tOZK2DAsTJO18Pppty2OqDZack0Ko4hhUHXUT/K1uCkVR4VeLRF Jk0RyJzvhEr9DsHvVU/9RrjCzM218/0= X-MC-Unique: rNUxlVKuMEaSRs2x9TugKg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=O6AXzgGtdYWeMtnt6YWtXqyOu/JX+5LJAyvz2m6ZVtw=; b=Px6a/dLy0prCASTvrIL1DHoDJq5R1L0ScATvb4TP45nCxzRkRogTrRiB0BlbxlV5jD p0cRNGKlgcE/MLuUnx3VS4JEn+2CzKBjNQ1wJP+iaaPjgsvgFFd4PEatiGc06hXQu/tm qNz0/+QvDkL21Mm9QRcMxMIvoB4XGH/wuzyyhe31h3OX5klJLWMN2BRemOkfAHlFlH6K qEKDqMVTJniG42Imk9ELkImJ2sWfdKncG77ZuhNr6C3X6wO2K4y3FBfvRdWy9ok5sxr2 XxJI0Og/YlbOYfzwk1uBm4e5I//8ofbVcJZZ9716T1QLrKMXYxyPQySKsGR7qKBvjQBd ierw== X-Gm-Message-State: ACrzQf1nnpdU6pOJQYOHCcpVXuW74+ASG3ZPa18I2H/VRpd04AGhowQP pJSRa1p+FC+NpowY1uqXCSWYqabDR5n9XLvRcgCiHjAxa+QyeKjpjDfbmJvBoykp68UxTLhhwHO vDTu4ykbgDZuchkzgTi7GUb+aQYMjfUtR2CemdSXuV6zVwq1iCf7UeeSFF+ew+ki5YLY= X-Received: by 2002:a05:6402:43cf:b0:450:eae1:c9d3 with SMTP id p15-20020a05640243cf00b00450eae1c9d3mr2139622edc.231.1663836589795; Thu, 22 Sep 2022 01:49:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6IioacpwDCdEDsGN/kdg8wnRbBXkbewG88bBcyTM/XG1KymnBHH9CIPEVdYOW+dC8QyUgGcQ== X-Received: by 2002:a05:6402:43cf:b0:450:eae1:c9d3 with SMTP id p15-20020a05640243cf00b00450eae1c9d3mr2139601edc.231.1663836589479; Thu, 22 Sep 2022 01:49:49 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 16/26] curl: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:14 +0200 Message-Id: <20220922084924.201610-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838927845100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 1e0f609579..cba4c4cac7 100644 --- a/block/curl.c +++ b/block/curl.c @@ -855,7 +855,7 @@ out_noclean: return -EINVAL; } =20 -static void curl_setup_preadv(BlockDriverState *bs, CURLAIOCB *acb) +static void coroutine_fn curl_setup_preadv(BlockDriverState *bs, CURLAIOCB= *acb) { CURLState *state; int running; --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663840031; cv=none; d=zohomail.com; s=zohoarc; b=gpiLn5qwTmHEATrDiFXThGXuyYOJwj+s/GwkbajWfi+QtvQ6fJGmQJhADRr63Ldaiz0CKI80NrhLfhMu+W23tWgK8PFIoiYM1UwQSBGUZ80YUblV9eLskezxFhkP19JxobdWj1GCcSYYXoRjtEs901WgENzWUj0YuAWSJxWohdY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663840031; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lGlB7wDGTDXEUeXT2vUgCzKB9NN/3MUucWZTD+WyvLA=; b=FI+7fQvHpQ1EN2qYE/jELpew83P4TpudfYSrak0iU/S5KW9mva30+Qrwwg2MY10IZm6IU9pPqaZQqj3HXVpMmlZZAFZRbcfcSKEI5bqVPn/Kr/HegOTR2Zxw/8vc2fteeR5/VfADEyv5h0ggEDJRDOgmWFD0KwV+R5X/1VfVVhU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16638400316541018.8401220973452; Thu, 22 Sep 2022 02:47:11 -0700 (PDT) Received: from localhost ([::1]:59246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obInW-0000j1-2C for importer@patchew.org; Thu, 22 Sep 2022 05:47:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuO-0004YL-6f for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:40040) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuL-0003TA-At for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:11 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-507-7Bg3s1vrNcezx5rCgw-Hqg-1; Thu, 22 Sep 2022 04:49:52 -0400 Received: by mail-ed1-f70.google.com with SMTP id y14-20020a056402440e00b0044301c7ccd9so6160734eda.19 for ; Thu, 22 Sep 2022 01:49:52 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id o10-20020a50c90a000000b00455262f83aasm543028edh.32.2022.09.22.01.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lGlB7wDGTDXEUeXT2vUgCzKB9NN/3MUucWZTD+WyvLA=; b=jGGkSMNv7SdSECyYWDriuVCzZpTO/DoLKqhibpLBa5x8hzzKXhTRY7E6ZocF5R+VwYPLoT EwubIc6c5fk7BQqBdUw+j5yLqrokcUQV2Arrx4FNcoZIf1Y13gHtSZcfrvj910SI7KFCW0 jHK9xvm+wZEOCTt/TpZTC7tGqONNhtw= X-MC-Unique: 7Bg3s1vrNcezx5rCgw-Hqg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=lGlB7wDGTDXEUeXT2vUgCzKB9NN/3MUucWZTD+WyvLA=; b=ihAPMqr5vy7/BhCxvLI2fbLEhnmwwUUtlnoQKqfAFznzmNvdUwaP6Brap6vdvTcYK7 2PtNIRNBNu9CmhG023J3EO/aP/BSCF7lyowKRWkpkoRRFm04U8tLffdF8kV5X5SmzELy MIIPzx8ENoaPg7EozlzfA/WwuCSurULIE6799IMtXboPexnItrwWTefbEmDR0MFOireH 3xBm3XT/8AHVlqS8i2wQzRecCs7E06x/KIcOzxAurCTz07Nrx6yofprLYpL34bqel7tK mvPMzJAglMYo2KcmVZNr7ad4UbKXSjafusS3ujEGbRALdZodUhna3pv92ts9m6irHhYa wueQ== X-Gm-Message-State: ACrzQf20bfkQwdu5G1ZAGFq60bivYoEUKSPEP3ypHS5jFO2RSXFj17+a DpdIBsS3XoB7d3XFezKyEDmycCqJm1k43gsrEcjmd0XhNNatfX7YFxDtEptKmDpdlxMQlQlcdT5 q4XBtEMDVCDlOvteItton9d/kMfWHZcG/QVfFSGXPSH5a4Cg9DLvXcSp2ngTgRWeB6zs= X-Received: by 2002:a17:907:d04:b0:76e:e208:27ba with SMTP id gn4-20020a1709070d0400b0076ee20827bamr1937104ejc.652.1663836591266; Thu, 22 Sep 2022 01:49:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4h+m5PCvGdNKBDVw9bBVGOFaUS51QGheBCvbV9LwgYi3/NLEdnODhQRGgD989LQHQ6K5toCg== X-Received: by 2002:a17:907:d04:b0:76e:e208:27ba with SMTP id gn4-20020a1709070d0400b0076ee20827bamr1937080ejc.652.1663836591032; Thu, 22 Sep 2022 01:49:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 17/26] qed: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:15 +0200 Message-Id: <20220922084924.201610-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663840033248100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qed.c b/block/qed.c index 40943e679b..8b6a5288c5 100644 --- a/block/qed.c +++ b/block/qed.c @@ -254,7 +254,7 @@ static CachedL2Table *qed_new_l2_table(BDRVQEDState *s) return l2_table; } =20 -static bool qed_plug_allocating_write_reqs(BDRVQEDState *s) +static bool coroutine_fn qed_plug_allocating_write_reqs(BDRVQEDState *s) { qemu_co_mutex_lock(&s->table_lock); =20 @@ -273,7 +273,7 @@ static bool qed_plug_allocating_write_reqs(BDRVQEDState= *s) return true; } =20 -static void qed_unplug_allocating_write_reqs(BDRVQEDState *s) +static void coroutine_fn qed_unplug_allocating_write_reqs(BDRVQEDState *s) { qemu_co_mutex_lock(&s->table_lock); assert(s->allocating_write_reqs_plugged); --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663840642; cv=none; d=zohomail.com; s=zohoarc; b=cJI7a05PN4Uc9o5cVrE+iOilGrqANrPWdXoXWJa14CmNClzZiYvvuCue3WUpVkWqJXba4AWMQwaliSciJwzTm+ukEdFMjppwJy4m3FwcgOr3K83BC+kYOLKh/Qz8iqUwuQstQDejZqoJ8jmJlpY/6OEFf8cY7UFjjzT77HMjvIg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663840642; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=I0XBVyfDqjzvf1WZr9xGpHcqO3KsnFZvkMQO+nzqMzY=; b=iE8WxGqcrf9fSoBxJbwbmJb1kgC6h9TV91LO45CWBjo7EaDs5Haim0kCQv6Vif8QN2A6jPNCgiavCKoCpngKRsfXQw2BiWMOJev+sfDaOEYuDgPBMgdcXEiAovHfnjeTQH4TjVFG/tRDsuITVmlDjMfUnul2bieTV93s9DqkKdc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663840642685901.7483340597964; Thu, 22 Sep 2022 02:57:22 -0700 (PDT) Received: from localhost ([::1]:55700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIxM-00005W-Hz for importer@patchew.org; Thu, 22 Sep 2022 05:57:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuA-0004VD-4N for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:42353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu7-0003Ev-U2 for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:57 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-61-93CjqVwQPZavL7JP1Z5NDw-1; Thu, 22 Sep 2022 04:49:53 -0400 Received: by mail-ed1-f72.google.com with SMTP id e15-20020a056402190f00b0044f41e776a0so6175673edz.0 for ; Thu, 22 Sep 2022 01:49:53 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id q27-20020a056402249b00b004542e65337asm3300883eda.51.2022.09.22.01.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I0XBVyfDqjzvf1WZr9xGpHcqO3KsnFZvkMQO+nzqMzY=; b=No+XM4wXRA5NfmUHG2FGRXzmSikqry0oDt10vjFpvNnkwQwSbQsqClnoYr5tFIV/Uc8iex hNYNEM8Sl4zZL7p3T41KdR8QCSEsrH84UIfLkWCHrr61DoHPvhFnzUSoO3nN69qbdcJ6JU 7JuEpz2c+NcvWB4G54kV7gKOJTzOIRE= X-MC-Unique: 93CjqVwQPZavL7JP1Z5NDw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=I0XBVyfDqjzvf1WZr9xGpHcqO3KsnFZvkMQO+nzqMzY=; b=jLR1svsVCRIQEqOV7S9eTl0ftzdUEnsaynvURG7WA5qOaIB0eiH+tU7SSERRy4om5O +2sX0oy7e2gD5muXNUUBbzu2fUuWTZA7u4WszzGxqhqv5+WSBKgd+Uv6QXkgPh5aMiyY KwcOkYY+ALt2pzEBe9bWpO8MORrddGwYLPykZ1VhVyXFPgaty8reACbZ8Yl5cnhghmW2 EjO+ZAjLLlTbDwYWIn+TxISIQ17MPnZvfcRH0Ri4u6yv7+mxoS5pJLIHWjsRqceaXS32 VnQiUkqFg2vnH81f9mMIEis5LZD1pqZBEQL2o0nGJd/1miIeQDKyPOrq1/o5RPgDnpJq QwQA== X-Gm-Message-State: ACrzQf0bPwnFINiuNv1pxTx7KT7tuUiYyeiUrjrjtGRJzhJGPzEX56O4 yjQCBn5NBZRC2W/a5+XXhcpyhVVbcV+4rla2Wd4Awbsu1s4eKfeVTHGcrE0Bz6oRe7NueAew4rn vGIdm5GiKbw9sHc8CYvD3+wL43AcmlSDcuepUOBVO8jjg3W6gxOtK1kpgMjMoKqmabUU= X-Received: by 2002:a17:906:ef8c:b0:77c:8d9a:9aed with SMTP id ze12-20020a170906ef8c00b0077c8d9a9aedmr1911464ejb.704.1663836592628; Thu, 22 Sep 2022 01:49:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6pKH6N2UcKfR4P6+GzYa8xHSDgtkNV9bqibAD6ewNJiUWhmkbMHS1MgcEHwRYJp/GdZN6KWw== X-Received: by 2002:a17:906:ef8c:b0:77c:8d9a:9aed with SMTP id ze12-20020a170906ef8c00b0077c8d9a9aedmr1911440ejb.704.1663836592322; Thu, 22 Sep 2022 01:49:52 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 18/26] quorum: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:16 +0200 Message-Id: <20220922084924.201610-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663840644945100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/quorum.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index f33f30d36b..5ff69d7443 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -161,11 +161,10 @@ static bool quorum_64bits_compare(QuorumVoteValue *a,= QuorumVoteValue *b) return a->l =3D=3D b->l; } =20 -static QuorumAIOCB *quorum_aio_get(BlockDriverState *bs, - QEMUIOVector *qiov, - uint64_t offset, - uint64_t bytes, - int flags) +static QuorumAIOCB *coroutine_fn quorum_aio_get(BlockDriverState *bs, + QEMUIOVector *qiov, + uint64_t offset, uint64_t = bytes, + int flags) { BDRVQuorumState *s =3D bs->opaque; QuorumAIOCB *acb =3D g_new(QuorumAIOCB, 1); @@ -273,7 +272,7 @@ static void quorum_report_bad_versions(BDRVQuorumState = *s, } } =20 -static void quorum_rewrite_entry(void *opaque) +static void coroutine_fn quorum_rewrite_entry(void *opaque) { QuorumCo *co =3D opaque; QuorumAIOCB *acb =3D co->acb; @@ -574,7 +573,7 @@ free_exit: quorum_free_vote_list(&acb->votes); } =20 -static void read_quorum_children_entry(void *opaque) +static void coroutine_fn read_quorum_children_entry(void *opaque) { QuorumCo *co =3D opaque; QuorumAIOCB *acb =3D co->acb; @@ -602,7 +601,7 @@ static void read_quorum_children_entry(void *opaque) } } =20 -static int read_quorum_children(QuorumAIOCB *acb) +static int coroutine_fn read_quorum_children(QuorumAIOCB *acb) { BDRVQuorumState *s =3D acb->bs->opaque; int i; @@ -643,7 +642,7 @@ static int read_quorum_children(QuorumAIOCB *acb) return acb->vote_ret; } =20 -static int read_fifo_child(QuorumAIOCB *acb) +static int coroutine_fn read_fifo_child(QuorumAIOCB *acb) { BDRVQuorumState *s =3D acb->bs->opaque; int n, ret; @@ -664,8 +663,9 @@ static int read_fifo_child(QuorumAIOCB *acb) return ret; } =20 -static int quorum_co_preadv(BlockDriverState *bs, int64_t offset, int64_t = bytes, - QEMUIOVector *qiov, BdrvRequestFlags flags) +static int coroutine_fn quorum_co_preadv(BlockDriverState *bs, + int64_t offset, int64_t bytes, + QEMUIOVector *qiov, BdrvRequestFl= ags flags) { BDRVQuorumState *s =3D bs->opaque; QuorumAIOCB *acb =3D quorum_aio_get(bs, qiov, offset, bytes, flags); @@ -684,7 +684,7 @@ static int quorum_co_preadv(BlockDriverState *bs, int64= _t offset, int64_t bytes, return ret; } =20 -static void write_quorum_entry(void *opaque) +static void coroutine_fn write_quorum_entry(void *opaque) { QuorumCo *co =3D opaque; QuorumAIOCB *acb =3D co->acb; @@ -715,9 +715,9 @@ static void write_quorum_entry(void *opaque) } } =20 -static int quorum_co_pwritev(BlockDriverState *bs, int64_t offset, - int64_t bytes, QEMUIOVector *qiov, - BdrvRequestFlags flags) +static int coroutine_fn quorum_co_pwritev(BlockDriverState *bs, int64_t of= fset, + int64_t bytes, QEMUIOVector *qio= v, + BdrvRequestFlags flags) { BDRVQuorumState *s =3D bs->opaque; QuorumAIOCB *acb =3D quorum_aio_get(bs, qiov, offset, bytes, flags); @@ -746,8 +746,9 @@ static int quorum_co_pwritev(BlockDriverState *bs, int6= 4_t offset, return ret; } =20 -static int quorum_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, - int64_t bytes, BdrvRequestFlags flags) +static int coroutine_fn quorum_co_pwrite_zeroes(BlockDriverState *bs, + int64_t offset, int64_t by= tes, + BdrvRequestFlags flags) =20 { return quorum_co_pwritev(bs, offset, bytes, NULL, --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838943; cv=none; d=zohomail.com; s=zohoarc; b=eM4eLvp+uskBFWuvOqwETxNLxO8YMSH3d7mwwpNC70f8saEnHi95DgKkFlxoAfcoVZcWGanb/ryhM9GwAFCUlW7pw8MMIv1Uywpbwl7tB68T6iN9fSg6CzwSm0WxCoWkr4q+K09+SDulhr9RL+zZl2frhmefpIVuCTtd5Cbyq5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838943; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hMyrsH6flMrRHoTLooSRFWvZ6rfjgHHnfaNWVEG2s4w=; b=K/TVBr2lr2Xx3uZFDxWBqnqQSXAV7fSY0PBE+ATBHn2p0mHmmMEvHAld3e0C5x7rFnVLRroElpHAl22iX1fUceaJckA6NoHhkFbJVRaGfLX0gjGOm6bYywPerMCqEeWrlxv3eq3tbKYzgJAWAw2LXQ8p2AChJx7oiakMTL6NGL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838943421682.8058517248407; Thu, 22 Sep 2022 02:29:03 -0700 (PDT) Received: from localhost ([::1]:43770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIVy-0003o5-Dl for importer@patchew.org; Thu, 22 Sep 2022 05:29:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuB-0004WM-HH for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHu9-0003FM-Sd for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:49:59 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-464-rHaJnK1HNKOfFGOLECAGjQ-1; Thu, 22 Sep 2022 04:49:55 -0400 Received: by mail-ed1-f70.google.com with SMTP id dz21-20020a0564021d5500b0045217702048so6133724edb.5 for ; Thu, 22 Sep 2022 01:49:55 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id i14-20020a50fc0e000000b0044792480994sm3217874edr.68.2022.09.22.01.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hMyrsH6flMrRHoTLooSRFWvZ6rfjgHHnfaNWVEG2s4w=; b=JGKMmbON7ONVaGMr71c3FFndFVjqUkqRiKKUI0RSl1cJU57jqqKvWRkS8784Z4Orc3N8Ew WWR8Akh5VFydkMxA2XTc9Cjt7AbuPr0Oi+PUTRRY1FJrWhKc4YxrWjdZ6lRkgRX0d2kSUP FLCJPPA/40EfmZiAuCpJUgBU1w3O2p4= X-MC-Unique: rHaJnK1HNKOfFGOLECAGjQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=hMyrsH6flMrRHoTLooSRFWvZ6rfjgHHnfaNWVEG2s4w=; b=0Iw5wSSytmXfBff1kjH5pWJ5zu2oJ7XhLUBSzVuEk1pVPLtrBUaOb5BgxRrhTQ+8W3 VVMKxx3u+mO2qAej8/1LjGyez7gcz3umFzafDwJG6sGDqHq1DrQiC2mq1aO03kYiNmiG kxRDFkN7pADk+7Fre/599JqChJgBOWZOHl67onxjxIo3Zpf2MjLXPctgnc5Opp8w66EE Lvtv+3wiMAScdQGZwn79I7ekW/PHkW+mXgQ1/4BLKDdKtyb3Al2L6grbBU+54I4Bgj2T VzRuDvHz2STfuDuj+k3eIViOz1MJ20CGqyfjY6NJH2x1bQaC1Xfk7885DgeV+UucuxTs hj9w== X-Gm-Message-State: ACrzQf1Ohga/+31RytF/c5/VQDxuzV5SVAEAeEdkA7dWQXFK1czyzKDR 9dzVa3t339OOO9DxrY2eOmAUZeD/nka3ZFVq06nzpg4fXBgjLbrA6t66PiLGAXmKgmHHGsnlZlr eG99xLLdrJa4JrJuxYCK63putIBP9CMFSKWfdFnUt0tlavS5EJ+aQ9NYPCbGDepYgGzs= X-Received: by 2002:a17:906:847b:b0:773:db0f:d533 with SMTP id hx27-20020a170906847b00b00773db0fd533mr1908585ejc.0.1663836593953; Thu, 22 Sep 2022 01:49:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4T/ePeV0dljIx8aQjrbTRqhtjmviIwpsLGx8I3coEtaazCnt4nx0QERRMbqKn97AShhF94ZQ== X-Received: by 2002:a17:906:847b:b0:773:db0f:d533 with SMTP id hx27-20020a170906847b00b00773db0fd533mr1908569ejc.0.1663836593724; Thu, 22 Sep 2022 01:49:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 19/26] throttle: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:17 +0200 Message-Id: <20220922084924.201610-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838943764100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/throttle.c b/block/throttle.c index 6e8d52fa24..ddd450593a 100644 --- a/block/throttle.c +++ b/block/throttle.c @@ -162,7 +162,7 @@ static int coroutine_fn throttle_co_pwritev_compressed(= BlockDriverState *bs, BDRV_REQ_WRITE_COMPRESSED); } =20 -static int throttle_co_flush(BlockDriverState *bs) +static int coroutine_fn throttle_co_flush(BlockDriverState *bs) { return bdrv_co_flush(bs->file->bs); } --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663841311; cv=none; d=zohomail.com; s=zohoarc; b=QKDeREcW+lbFYlZb+yaIYuWhAT/MEV4kSXaV8yvg5uAphxbhB38i5UyYT2EtrYlLAJte7DpCcMlaLegRsQlWIH/IvP73lI5QUjwUrHDoLz93ZrhubWFhHmX3vkagWmt9KmAif0vAXjmyKx0jF+R3kYj0CWZA/tqwycfAYKuIZWA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663841311; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3wwzh3LZ3A3YlWSfvO4liFhM0kWBTm1zGZfGRa3JTzY=; b=RVvWUGkKMgShKIsUyocfM7VPQJzibgQkg4qBaayjeH2DAsTlR9vi4QgteA6yABwpZJv3MIJJDUPJl351ocVbT8D3zNf57rgzRtq29wvDs7XNjVU4ChsedDbykW0T03VruFayFEzqpBAwxSsqirKQmWOPFO8HLefPlXbLi/P5ItM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663841311668645.6169387320255; Thu, 22 Sep 2022 03:08:31 -0700 (PDT) Received: from localhost ([::1]:52662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obJ8A-0006hx-3a for importer@patchew.org; Thu, 22 Sep 2022 06:08:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuD-0004X6-1W for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuA-0003Fb-FM for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:00 -0400 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-8-mIQ4ljSCONa8hwr4c2jrug-1; Thu, 22 Sep 2022 04:49:56 -0400 Received: by mail-ej1-f69.google.com with SMTP id dt13-20020a170907728d00b007825956d979so427936ejc.15 for ; Thu, 22 Sep 2022 01:49:56 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id 11-20020a170906328b00b007389c5a45f0sm2315312ejw.148.2022.09.22.01.49.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3wwzh3LZ3A3YlWSfvO4liFhM0kWBTm1zGZfGRa3JTzY=; b=Yv4nVDolCM1Wv7jbBUiquNgPq8ZISbbEsesws5R+iccGZWK1PIKuk88QroOUR83WZx8eLX VtTbF4l+w1esxYK1LsIWP59c22kCGXQwysehUCRewaHPhM3MB9r+khEQJMhuqws4ldp0I4 nTx/tBhmFHAEp7fi/I/FQ+ttgbB9ANk= X-MC-Unique: mIQ4ljSCONa8hwr4c2jrug-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=3wwzh3LZ3A3YlWSfvO4liFhM0kWBTm1zGZfGRa3JTzY=; b=OayvQwAZTv1JHBRUOEzBdz4bDoTFuNWEtFzh21QhW57xxUQ2KibiV+CAhtisoq+0UM FAcFSXPySElAjQK0M42z4HNpC4saJZ+s6gu9Lej0Ac/rNp4NtXUjXyp1dS62KiwW0Vjz dM2LtlynUzDotMtDiPxs2lnZI2KzccQcuY5xvoq/gKMg3ecK/S1NNqSsH3JLcC9BoZMg snsp/C/V1ElW6bygilO6gxa4mgdDuly4jGBAfIWBRARakzjJGOwSubyqiRVpti27NtL7 XMZYO3hY6sA1RF5bePzHJ6fwLC6PZSbYjHHu0M06zhgRslh0aMWbiyFyyJQsYYwP9PQB WGrA== X-Gm-Message-State: ACrzQf3hRPAWeQaB+aLsvUzOleLbYoLd2so77BddPISMW5YIVpDveB+V vDfUOE2lRANqC5BOzjWlMtfm0MeWK9EEF6YXxr+J6s8Y9bHeyb2TCLm64OwKttjLNXIggKLLKpz OcLDXlMhu0wLdMwpGNrEbYgmCTcy6XpAjZjFqR2rzMOZXo9S5dRGnToTTjQ5OUCvNm+A= X-Received: by 2002:a17:907:7621:b0:741:6656:bd14 with SMTP id jy1-20020a170907762100b007416656bd14mr1812920ejc.298.1663836595372; Thu, 22 Sep 2022 01:49:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kS4kFvGNzTzNNX5/k2HH2ygZizwrOyxILTdQOgo05urL19ln/7rR6+U4igPkPDJXVuFg/Bw== X-Received: by 2002:a17:907:7621:b0:741:6656:bd14 with SMTP id jy1-20020a170907762100b007416656bd14mr1812901ejc.298.1663836595037; Thu, 22 Sep 2022 01:49:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 20/26] vmdk: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:18 +0200 Message-Id: <20220922084924.201610-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663841312693100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/vmdk.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index fe07a54866..34b5e3f52e 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1787,10 +1787,10 @@ static int coroutine_fn vmdk_co_block_status(BlockD= riverState *bs, return ret; } =20 -static int vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset, - int64_t offset_in_cluster, QEMUIOVector *qiov, - uint64_t qiov_offset, uint64_t n_bytes, - uint64_t offset) +static int coroutine_fn vmdk_write_extent(VmdkExtent *extent, int64_t clus= ter_offset, + int64_t offset_in_cluster, QEMUIO= Vector *qiov, + uint64_t qiov_offset, uint64_t n_bytes, + uint64_t offset) { int ret; VmdkGrainMarker *data =3D NULL; @@ -1868,9 +1868,9 @@ static int vmdk_write_extent(VmdkExtent *extent, int6= 4_t cluster_offset, return ret; } =20 -static int vmdk_read_extent(VmdkExtent *extent, int64_t cluster_offset, - int64_t offset_in_cluster, QEMUIOVector *qiov, - int bytes) +static int coroutine_fn vmdk_read_extent(VmdkExtent *extent, int64_t clust= er_offset, + int64_t offset_in_cluster, QEMUIOV= ector *qiov, + int bytes) { int ret; int cluster_bytes, buf_bytes; @@ -2015,9 +2015,9 @@ fail: * * Returns: error code with 0 for success. */ -static int vmdk_pwritev(BlockDriverState *bs, uint64_t offset, - uint64_t bytes, QEMUIOVector *qiov, - bool zeroed, bool zero_dry_run) +static int coroutine_fn vmdk_pwritev(BlockDriverState *bs, uint64_t offset, + uint64_t bytes, QEMUIOVector *qiov, + bool zeroed, bool zero_dry_run) { BDRVVmdkState *s =3D bs->opaque; VmdkExtent *extent =3D NULL; --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663839609; cv=none; d=zohomail.com; s=zohoarc; b=FieA0T2lNQZr8ENA1PRxvyyDpK6ryhym85A16/U5Gag8H+CAtJnJDOBtb5QrRMTYNC31XUp0ihPXfuETiJfCXaioecDTvaOCay6YLN9nsEjkg61A+02IEOh2jiMWMTviTK+mYzStDvnljR5M3g2Oad+LHDeg/aZdiC+oqFRK0ak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663839609; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZJE4UpzADeZRyzZ3OwaQDec/7oqi/5qTZW8F7H71V7Q=; b=dZh/6HBYvc1+siqjgT7XaqU+muyb7Z1O36FCoP6gkbEBZ3M0XxlAqTLo1WKqty1BaBzLJI/0PE8FUBx0Z1ywfXbfR688Ih1pF8pOmDEJrebcWhbVMHOMqzjRoDlM4x1pxN0HZ0euE1cGWn0qVdGSoPklaS9nWHqgrReL19FoPVs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663839609295245.24795569707987; Thu, 22 Sep 2022 02:40:09 -0700 (PDT) Received: from localhost ([::1]:45514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIgg-0002Th-1z for importer@patchew.org; Thu, 22 Sep 2022 05:40:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuE-0004XP-9P for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:55500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuC-0003Fy-P8 for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:02 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-192-rz3N35uFOiu25dNvtR39wQ-1; Thu, 22 Sep 2022 04:49:58 -0400 Received: by mail-ed1-f71.google.com with SMTP id m13-20020a056402510d00b004519332f0b1so6150398edd.7 for ; Thu, 22 Sep 2022 01:49:58 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id u4-20020a170906780400b00777557d1ea2sm2339381ejm.47.2022.09.22.01.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZJE4UpzADeZRyzZ3OwaQDec/7oqi/5qTZW8F7H71V7Q=; b=QTuZS+73YsaRwNEvYgB6l+QbhsIo5JqlSkKIgjcvK+tkg+siw6/WC8i7otmiBdm7MNsJmJ d7HePXMYkUi+g/HRWAM4GZ5+3soR5x3Auizp30KuNw4h5CgjkeNhsZw5ArV+nlTs30z3Sb cH1dvyX266fBFM9iH2Y1dqMJLattGcM= X-MC-Unique: rz3N35uFOiu25dNvtR39wQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ZJE4UpzADeZRyzZ3OwaQDec/7oqi/5qTZW8F7H71V7Q=; b=yaaQQKnnQJILGcPpKkFztXpqhiqH81pPcnn+xHiYATBnv0p3pX+lmZS1QZeFwwvvfM 1+rWFpKl+Eos8ObpnOP4cIFFXRFl/rD//6ICIjMsBha96wQnwuaAkZklg5Ti8ah8smkL CPSUVU5IYF0rqE7uB9lPiAI2Nq1o3QlVznFbsmjtds9Xcie5XWOlWFerh1V5l9+lxsNO +7QUzaVVdKoVIAPRELkAHCZovqZ6oWBayJFDyB8E1fLxZ3prXXJcv3BpuOY8BMWGrSd7 zuQWj/pALxeoedw0eoWF8VbmPU2eiP4tKwR1FVJtvL0fVl+G+2ZAAp84HQbsSVUpISd4 +9wQ== X-Gm-Message-State: ACrzQf2OTD93JJqHFSbfZSMkfEjTgq9agqcGXO4GbHAFPxvnGzWBHXoZ Y5kFJLUKpy9gAEImM+GjAwBFGDkoJ3W0iFep8axwVEKS2My+XKeBaymaKMC+ayZcfUZgy0MXv/d 3rW+eH+yzi/mAx4ejOcebgD+WlIEEIQyDlOBSp5rogCjcguN6o0PCqfj5Vc/HdWtKmyE= X-Received: by 2002:a05:6402:4441:b0:454:8a74:5459 with SMTP id o1-20020a056402444100b004548a745459mr2099167edb.155.1663836597541; Thu, 22 Sep 2022 01:49:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jcRq8G06sI8m5ZrKWxsq22GSCjWdkzUXi9raRETmkfnQ/YpFHb5HZ+s9T1QxoUWX/j1m6vA== X-Received: by 2002:a05:6402:4441:b0:454:8a74:5459 with SMTP id o1-20020a056402444100b004548a745459mr2099147edb.155.1663836597268; Thu, 22 Sep 2022 01:49:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 21/26] job: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:19 +0200 Message-Id: <20220922084924.201610-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663839610436100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- include/qemu/job.h | 2 +- job.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/job.h index c105b31076..397ac39608 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -436,7 +436,7 @@ void coroutine_fn job_pause_point(Job *job); * * Yield the job coroutine. */ -void job_yield(Job *job); +void coroutine_fn job_yield(Job *job); =20 /** * @job: The job that calls the function. diff --git a/job.c b/job.c index 075c6f3a20..20f0d8b2cd 100644 --- a/job.c +++ b/job.c @@ -525,7 +525,7 @@ void coroutine_fn job_pause_point(Job *job) } } =20 -void job_yield(Job *job) +void coroutine_fn job_yield(Job *job) { assert(job->busy); =20 --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663841917; cv=none; d=zohomail.com; s=zohoarc; b=mTHW/h8NvJIIoV+KleKBiYHIjie0L+6fTM8EIyQfltLARJjQMsL4yIMBw2XE0wHdIBTKKMq88r4jpcV9aDvP3+9HP4ejIsWhX2MpeZhuV5Jf7eMVy9hXMiPENuNrw3eg3+0K1maxqqDbAl03sVP7d0BcIWI5jNqYiStnd8VYtUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663841917; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jlRpmw13yJeY3J6UUIbgkGjukH3jdpT3L4F+RsRzNo4=; b=aSPSuGS1RZ5Mr8SnaAWmuKpkbM6ZJlCIeEn5uYzHHaJakwV+Ab4fkHRyw1j07q5wEC8MPA5LK+QD5Iw+0tI5tzkV7qSBuJ2A8hoiDVDwx+GIlzxVwC56M00DBssegMOaBN+ghe4DJMLlURG70v1HJl560+Ap9XAat4m+vqpH1XA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663841917877770.1719749788865; Thu, 22 Sep 2022 03:18:37 -0700 (PDT) Received: from localhost ([::1]:37640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obJHv-0001EQ-Or for importer@patchew.org; Thu, 22 Sep 2022 06:18:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuI-0004Xp-Ey for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuF-0003OS-KN for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:05 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-372-6LSp7yXeNUGOfMBn5JBU5A-1; Thu, 22 Sep 2022 04:50:00 -0400 Received: by mail-ed1-f71.google.com with SMTP id x5-20020a05640226c500b00451ec193793so6220131edd.16 for ; Thu, 22 Sep 2022 01:50:00 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id x14-20020a056402414e00b0043bea0a48d0sm3297390eda.22.2022.09.22.01.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jlRpmw13yJeY3J6UUIbgkGjukH3jdpT3L4F+RsRzNo4=; b=YanAbPBMjD9QymQ3XkjtkJtODQfVAZjyExHoh+nwz6jTYxGaqWvrwH0zNKqB0jIDgN9HSI oWU9vkue2dMDEvM6z2leVfuAKXJVZ+hdhBoJYgd4hSA3SsitzLRj29dHZkSMAc/rHZpPcK 9pTSQ8KZD660KKJjgffXDoeV4p9Ojjs= X-MC-Unique: 6LSp7yXeNUGOfMBn5JBU5A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=jlRpmw13yJeY3J6UUIbgkGjukH3jdpT3L4F+RsRzNo4=; b=gD+wSFvOsajbtGaJ+VBxgpIyCC4HF5vujjgRwN0oX0w/73bObxHRBEXZPyulF2Ritk WtqFdbv17+UuR4+tmfpoOMqGTMTEvQfuDzmjoIy8H4Kz7Rv6T547lyjtPIXtY+yBcNQf cn+LHgXVWk1AW3PHFR8p4LuqOO9IwMxKVTMuW7knZhcL44gASNnPqPEUD6Svk2gFkZbD LSh9kqWd/lw9SaUWsVcJxywEb+Iz5P8FY2RrhXq8WfaWh1Ewg+Tf5z4aA5pi0z1ul6To Zq5f1hxienQqGFYf2o6TiJirRt1nq7vlF/vFiPdC2i1weOG67mIqeEAepSjTBbGx9rmp kByw== X-Gm-Message-State: ACrzQf1k/lo4jzFD1zmcGbAonUk3Bn86tN+BXPy8MJGtIhCMD/FKwcRd puvqj3yPDQzWOqeJeG5iceRGMp/sxfZt9WeCHYFfnUrnAQAxaAmLoBew9Gwb8+nhGCyA3arlc5h 9iyIcCeGoMwIjXfd4Np+Nmbt0eyiVSc/rdcyUNQJLLSIipOJj/uZ84Y/vnwXgNeTUNFE= X-Received: by 2002:a17:907:97d1:b0:780:26c9:1499 with SMTP id js17-20020a17090797d100b0078026c91499mr1793143ejc.371.1663836598852; Thu, 22 Sep 2022 01:49:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72rT8ihUE4xzn+H1NVMPs5/DtDo1rot23CMOz7Tg0ofooezRv1uP6pznS7C177EOeS5DwIFA== X-Received: by 2002:a17:907:97d1:b0:780:26c9:1499 with SMTP id js17-20020a17090797d100b0078026c91499mr1793120ejc.371.1663836598592; Thu, 22 Sep 2022 01:49:58 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 22/26] coroutine-lock: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:20 +0200 Message-Id: <20220922084924.201610-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663841919245100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- util/qemu-coroutine-lock.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c index 9ad24ab1af..15c82d9348 100644 --- a/util/qemu-coroutine-lock.c +++ b/util/qemu-coroutine-lock.c @@ -135,7 +135,7 @@ typedef struct CoWaitRecord { QSLIST_ENTRY(CoWaitRecord) next; } CoWaitRecord; =20 -static void push_waiter(CoMutex *mutex, CoWaitRecord *w) +static void coroutine_fn push_waiter(CoMutex *mutex, CoWaitRecord *w) { w->co =3D qemu_coroutine_self(); QSLIST_INSERT_HEAD_ATOMIC(&mutex->from_push, w, next); @@ -332,7 +332,7 @@ void qemu_co_rwlock_init(CoRwlock *lock) } =20 /* Releases the internal CoMutex. */ -static void qemu_co_rwlock_maybe_wake_one(CoRwlock *lock) +static void coroutine_fn qemu_co_rwlock_maybe_wake_one(CoRwlock *lock) { CoRwTicket *tkt =3D QSIMPLEQ_FIRST(&lock->tickets); Coroutine *co =3D NULL; @@ -365,7 +365,7 @@ static void qemu_co_rwlock_maybe_wake_one(CoRwlock *loc= k) } } =20 -void qemu_co_rwlock_rdlock(CoRwlock *lock) +void coroutine_fn qemu_co_rwlock_rdlock(CoRwlock *lock) { Coroutine *self =3D qemu_coroutine_self(); =20 @@ -390,7 +390,7 @@ void qemu_co_rwlock_rdlock(CoRwlock *lock) self->locks_held++; } =20 -void qemu_co_rwlock_unlock(CoRwlock *lock) +void coroutine_fn qemu_co_rwlock_unlock(CoRwlock *lock) { Coroutine *self =3D qemu_coroutine_self(); =20 @@ -408,7 +408,7 @@ void qemu_co_rwlock_unlock(CoRwlock *lock) qemu_co_rwlock_maybe_wake_one(lock); } =20 -void qemu_co_rwlock_downgrade(CoRwlock *lock) +void coroutine_fn qemu_co_rwlock_downgrade(CoRwlock *lock) { qemu_co_mutex_lock(&lock->mutex); assert(lock->owners =3D=3D -1); @@ -418,7 +418,7 @@ void qemu_co_rwlock_downgrade(CoRwlock *lock) qemu_co_rwlock_maybe_wake_one(lock); } =20 -void qemu_co_rwlock_wrlock(CoRwlock *lock) +void coroutine_fn qemu_co_rwlock_wrlock(CoRwlock *lock) { Coroutine *self =3D qemu_coroutine_self(); =20 @@ -438,7 +438,7 @@ void qemu_co_rwlock_wrlock(CoRwlock *lock) self->locks_held++; } =20 -void qemu_co_rwlock_upgrade(CoRwlock *lock) +void coroutine_fn qemu_co_rwlock_upgrade(CoRwlock *lock) { qemu_co_mutex_lock(&lock->mutex); assert(lock->owners > 0); --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663841630; cv=none; d=zohomail.com; s=zohoarc; b=gAEK4Jy8Jw4L0YTvNvIw6EddhEcrs+I45x3qLFjLGPnk1fkKsSoY6ZcDIr0636pBF5WfNrKDLtFI9QGlu4TdBz1ewl/awuy7Hsb9fguOaxlaIwgXaxPGws5k94vSk3l2njuzeBoDz9iHQQXN3f3Nhbx6CusLrvKoferSTfSq3QI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663841630; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dgOi7vAF4ipXIXW0KsqPLZlNYbP7Q8ITUi2hsfHmSgE=; b=k34sf0eEKfm8evVO8o8XFgaV6Cx5DVkSSRYS5dRKFsUfKJdBP6wPCeMg2fnwquVk18HzcnxU1VR36JVlvRx7X9SHn9nJ/TBrqLLrwqJwyfiXojuRd+e/KjaaDci7O/BNJflmeQTC2ShZrKv/eD5MszT0XYCQfOO0RhWRmgaHZXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663841630032980.0168684566366; Thu, 22 Sep 2022 03:13:50 -0700 (PDT) Received: from localhost ([::1]:40066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obJDI-0004RQ-1g for importer@patchew.org; Thu, 22 Sep 2022 06:13:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuG-0004XS-Om for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24277) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuF-0003Kc-7X for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:04 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-402-SUGAYeEBPtmhBy8y44YFBQ-1; Thu, 22 Sep 2022 04:50:01 -0400 Received: by mail-ed1-f72.google.com with SMTP id f10-20020a0564021e8a00b00451be6582d5so6217004edf.15 for ; Thu, 22 Sep 2022 01:50:01 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id x14-20020a05640226ce00b004544bdd56a4sm3331463edd.89.2022.09.22.01.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dgOi7vAF4ipXIXW0KsqPLZlNYbP7Q8ITUi2hsfHmSgE=; b=eP/RpE3z4QrBh23ORBsSY5WFmpNzH+kpvkwjkmsLh2YvMVkRBvhQ4rJKRT8fwPTaujnkl8 d48aKXoJjL7KhAfMCjvBEwZKKLtHV+mcYposHlEwPRh0QteC8u/8IYcDOzwbcXL79mv+Yc 2VIqYPj1KSJ51YBx/b2d2j1e90PkcqY= X-MC-Unique: SUGAYeEBPtmhBy8y44YFBQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=dgOi7vAF4ipXIXW0KsqPLZlNYbP7Q8ITUi2hsfHmSgE=; b=0QWdlXqlGoVYpmBf7QG+ygjUmZsP8bfgurit1HV6RGO0Ctj7LatrEGxGR4HFxE2IfK hopJr+y7YTn1ELd/GyUn3AQRDxNmPWvlyTjtczuWTikhEpTe+UoIx3vC2l9ce6KhD6Tu RWSvvsd2AaZ8Ze/nStxQDmFYblU2EIW8mUaHorv0S7PwquM03X20OUakleaP7i5o7fu8 vcQ7dte3jX2Qy8J/KVhF/3nDkDrKs3l+Ys3q94V93m3nt1YyLAAMwJMkP7g6qlUsErSM mHbgu8/bzSzXCAMnRmQVeWyc8AXVLGG1W9VFj+OfriC0ejuUbyaqUUm9cLbg5KGWKj5c JQFg== X-Gm-Message-State: ACrzQf3kKBKJdCNiCXesdZht6QcvnTsUskUw8Qtf6Zc1D7uWuMCaK9us fJA4cvEUycNME+qb53dZO//ibZ/n3BMsimBUVKiZfSyTuBUJ3lqVAIs5YPtL6I9NjB8ZAJRtiN3 +w/il0ajMeLL4OiAqSrmCRS3ltO750dIMRaCJ2H2+u/0FRZGjzNg+g1t0dLKF8u+F1sA= X-Received: by 2002:a17:907:9490:b0:781:c079:1294 with SMTP id dm16-20020a170907949000b00781c0791294mr1956095ejc.29.1663836600107; Thu, 22 Sep 2022 01:50:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM79VI+tSCtK6t4Y5zFEEAtK6h+A5FMxZxBqTPkO3kjMYeF4W73ESzMk+hbyx/rLFniFAE5Vjg== X-Received: by 2002:a17:907:9490:b0:781:c079:1294 with SMTP id dm16-20020a170907949000b00781c0791294mr1956077ejc.29.1663836599836; Thu, 22 Sep 2022 01:49:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 23/26] raw-format: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:21 +0200 Message-Id: <20220922084924.201610-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663841630407100001 Content-Type: text/plain; charset="utf-8" Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/raw-format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/raw-format.c b/block/raw-format.c index 69fd650eaf..45440345b6 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -411,7 +411,7 @@ static void raw_lock_medium(BlockDriverState *bs, bool = locked) bdrv_lock_medium(bs->file->bs, locked); } =20 -static int raw_co_ioctl(BlockDriverState *bs, unsigned long int req, void = *buf) +static int coroutine_fn raw_co_ioctl(BlockDriverState *bs, unsigned long i= nt req, void *buf) { BDRVRawState *s =3D bs->opaque; if (s->offset || s->has_size) { --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663839418; cv=none; d=zohomail.com; s=zohoarc; b=HGTah6W1eJc+1sND5SVGUxLYgtEeYWXJsnCi3gvu5uZF6LfbIgpCKXOirALmKUzpWFvSH9h5eXRXS8y3277RMoja9OSzVYph8ZlBSP6aDp780z8UP0EURb7cY7jNVfm/HXy06w2b+WbpWlSiwZxyAVoDXXQlc27SL2TJAnNfBzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663839418; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zy9hH9UGcVPO94N0r3wVdZNTgpTkq2Z804XTGmHYlxg=; b=Vsk9lIgG9UV0XkbkUomDfQBuIkp+VlC/frNsYeUBGP/v4OiemH1ReDRTtYcUUs87sVvQQXuEJy1N3u1e8Gbsw9cb5yqM/92nFdJWVOffFgKAOc/f+0dKkxSRcUsTbVhFVNNdMIma94O8aM8vxtDGUihd4lY5yybA4mTQuyfvAKQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663839418836955.089548584985; Thu, 22 Sep 2022 02:36:58 -0700 (PDT) Received: from localhost ([::1]:37106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIdc-000898-VV for importer@patchew.org; Thu, 22 Sep 2022 05:36:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuO-0004YH-3f for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuJ-0003SQ-J6 for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:09 -0400 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-284-HkF0J4rtMKGC4LuF1wvMNw-1; Thu, 22 Sep 2022 04:50:02 -0400 Received: by mail-ej1-f72.google.com with SMTP id oz30-20020a1709077d9e00b0077239b6a915so4184664ejc.11 for ; Thu, 22 Sep 2022 01:50:02 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id f19-20020a056402195300b004531b137e4bsm3298612edz.67.2022.09.22.01.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zy9hH9UGcVPO94N0r3wVdZNTgpTkq2Z804XTGmHYlxg=; b=gvfvf9VJrIvAgPTbRabm/XN9C6LALhXyuvGy2fnsu8dUOsJuJwtav/pWB+4ooOzqeXzLs7 YLRQ98NzYenkLv1Fgq1VSH/kSvNPXv6HuN4OhnDW5yP/neAPQ5vwAQszNqaGykf74o+s8M Fsw3Ipx9jUrcxZXhrf1bbYDDeCOWpng= X-MC-Unique: HkF0J4rtMKGC4LuF1wvMNw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=zy9hH9UGcVPO94N0r3wVdZNTgpTkq2Z804XTGmHYlxg=; b=jShtw5iCVkI/pmEzj7q4NSOLcE8bFdcyrdC56GNfy93zHeui6PbptVnYVDfk2f+Ze9 KFrnDc9duHA0yOtb/2qK8M9CSy+1znu54otVJsn73YjzO3Ul2kxRHzhINsLOU44brLWR BoaAWN2ofitbTE+b6EOQs3sBHcr54rR5t/d/m7NH7krfJw7N3av01z8vTXWlSP6HWVva BkW7t4E5t/zU1PAuQe6L0jju1O3WMTdZUob6b2cVcXqVGDgq9dPI9EaWTaMS+tIkPakI rVpFtDQ7T4kUlOiyNrm+7T/XS7gIQf34kkD4DMVVavU1gb3o/zhyZNHG4q2W3jdVUqid kDlQ== X-Gm-Message-State: ACrzQf1PgA0yAPgvDIzbZXrkDczJg0UTsoru9OsA7eRR4atFqehSYbeH s7kVsDP5KsVVrVbuuotJcfFemTQy9Vk8nZlbVpAMIzPhn/2BZs4fc9/gd2DgPCE91htWqkBQotI +//3GDdGA7AKiKdmU1OsGrSwUy7chiiumfAJJA32H89AGKdtWTCoy0DMvMpdxt5c9348= X-Received: by 2002:a17:907:31c3:b0:770:852b:71a2 with SMTP id xf3-20020a17090731c300b00770852b71a2mr1828981ejb.557.1663836601450; Thu, 22 Sep 2022 01:50:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Ii/Aim2Hw7tzlUEn8Ye3yHbxQztvJEuZZNE9Em7K4uYqI2bHIXqvPhesn7eZmgVeq61co4Q== X-Received: by 2002:a17:907:31c3:b0:770:852b:71a2 with SMTP id xf3-20020a17090731c300b00770852b71a2mr1828961ejb.557.1663836601116; Thu, 22 Sep 2022 01:50:01 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Greg Kurz Subject: [PATCH 24/26] 9p: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:22 +0200 Message-Id: <20220922084924.201610-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PP_MIME_FAKE_ASCII_TEXT=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663839421248100001 From: Marc-Andr=C3=A9 Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-Andr=C3=A9 Lureau Acked-by: Greg Kurz Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- hw/9pfs/9p.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index 994f952600..a523ac34a9 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -424,21 +424,24 @@ typedef struct V9fsGetlock extern int open_fd_hw; extern int total_open_fd; =20 -static inline void v9fs_path_write_lock(V9fsState *s) +static inline void coroutine_fn +v9fs_path_write_lock(V9fsState *s) { if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) { qemu_co_rwlock_wrlock(&s->rename_lock); } } =20 -static inline void v9fs_path_read_lock(V9fsState *s) +static inline void coroutine_fn +v9fs_path_read_lock(V9fsState *s) { if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) { qemu_co_rwlock_rdlock(&s->rename_lock); } } =20 -static inline void v9fs_path_unlock(V9fsState *s) +static inline void coroutine_fn +v9fs_path_unlock(V9fsState *s) { if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) { qemu_co_rwlock_unlock(&s->rename_lock); --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663839857; cv=none; d=zohomail.com; s=zohoarc; b=geIxq4DWKDXF1rSeigeQm4ZPJSqSGh4Ty/TxfhMZCneUFWk7q/PHP5S5muWX2T5TYGS/TgMPBeM/H5iw21ZkLbKRsHGcZVqrw2ULwZVCTuqkKKRJ3U22Hpd5BOhFJqJ1EgNf4bVzL0zkkDJVcTo5UzorDo99VeaBrpZSX0NMtmM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663839857; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lQfYt/ZXJmjE1TcR1De7ZzjZEgfz0xSkkoMH4Gfc/48=; b=NT54cbtXwZqkvmkS3yu8APbSCHmtrRpfhFgv95xiFSDWYt/7DvTPyIbRZzta0d/g1TwIxW4ARsSrHQGGy8Q4MQf6YP/fCEXrac+i9/ab6XY1RKTTF6hYIIYm6AgLbhe4HcS5rqHhCkj7AXZVf4LLEJyKHZakQk5I4YX+45UYv0g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663839857280188.40059837764056; Thu, 22 Sep 2022 02:44:17 -0700 (PDT) Received: from localhost ([::1]:45730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIkh-0006RY-Ja for importer@patchew.org; Thu, 22 Sep 2022 05:44:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuO-0004YJ-4B for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:43156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuK-0003Se-6X for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:10 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-399-6Pm6RV2YNZqY1OZR1hcA_Q-1; Thu, 22 Sep 2022 04:50:04 -0400 Received: by mail-ed1-f69.google.com with SMTP id y1-20020a056402358100b00451b144e23eso6149170edc.18 for ; Thu, 22 Sep 2022 01:50:04 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id j12-20020aa7c0cc000000b00445e1489313sm3202658edp.94.2022.09.22.01.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQfYt/ZXJmjE1TcR1De7ZzjZEgfz0xSkkoMH4Gfc/48=; b=WRqRZfhQSzRWbsXQ073f4d45ZbhEvBqP7SDjtViiWfMkhDF5Iv06bgHP6VQf2Xjyydh/R0 vlgGg0D5RD+TBKQG+3rYutUsRw0uk4S0+2OfBb+MW0ZOotM6nqq2ynUxaoLdmJKrS+DYO7 R1FkBAzQt0zxJ1pdCqc5qQbIF6HSh00= X-MC-Unique: 6Pm6RV2YNZqY1OZR1hcA_Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=lQfYt/ZXJmjE1TcR1De7ZzjZEgfz0xSkkoMH4Gfc/48=; b=4GmYFF5euQ5KVx2YRlijliph1g0HDDieyWe5sHO5OlD5QCSsE36LRBcvsGUKVfbqNt aQeDTXpbW5O+7HKoT39d7SHCyL22O2yhQqu3rB4JDLbh5e82BNerWpilQx2Qx0iWfAgv TNiwvOz4whN4q9kFrdXpN5DonX1W4qXlzFTGMCoN3uZr7+u4i/ocLOJpX3LckxJ28BIh btTN269HtT6VysqXUCEVrHACsu0S4SZh8HnSx2xjFOmNqRN2nl0mfRSp+iqps4aXMQxm DuF0qilgbT2FwhNYQ0354JsTmbC/gBoS7pDYIRUW3Qq04/cJPIWvHySX/B6G7R+wY6wQ t7Fg== X-Gm-Message-State: ACrzQf3H9RTLaa/ooeftKoSrncJvHUk0wgMQtYeEEcpFHSAduVMb03em OdZi3skWNkKilxV1eqEfW3ZdMV7zsJWWoU2Fnbz4vJJfLmnSIRCQ3mw0LfucwVhcWsZZx143XpA qcE3ho1Bd/jlVs5OImW5yF+eMkoDD2gHL0aHa44bVtcr6yAqPTafAD8nHuAcvpYPsUq4= X-Received: by 2002:a17:907:948f:b0:780:4c66:6689 with SMTP id dm15-20020a170907948f00b007804c666689mr1840395ejc.401.1663836603506; Thu, 22 Sep 2022 01:50:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7cJFxX8uyRf4ElbdYuY46kfVx6+c7+iQ+tOGc0cr92qLsr2o7YirK1G8Ds2gzivpJ7M4cCUQ== X-Received: by 2002:a17:907:948f:b0:780:4c66:6689 with SMTP id dm15-20020a170907948f00b007804c666689mr1840373ejc.401.1663836603282; Thu, 22 Sep 2022 01:50:03 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Juan Quintela , Stefan Hajnoczi Subject: [PATCH 25/26] migration: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:23 +0200 Message-Id: <20220922084924.201610-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PP_MIME_FAKE_ASCII_TEXT=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663839858829100001 From: Marc-Andr=C3=A9 Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Juan Quintela Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- migration/migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index bb8bbddfe4..739bb683f3 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -574,7 +574,8 @@ static void process_incoming_migration_bh(void *opaque) migration_incoming_state_destroy(); } =20 -static void process_incoming_migration_co(void *opaque) +static void coroutine_fn +process_incoming_migration_co(void *opaque) { MigrationIncomingState *mis =3D migration_incoming_get_current(); PostcopyState ps; --=20 2.37.3 From nobody Tue Apr 16 14:00:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663838262; cv=none; d=zohomail.com; s=zohoarc; b=miiKscFbZZyXUEsT3EuHRYJk+CbmVaxSPNYH0RaKgURgvLc/+wrpeXNyklv7ZRD1qamKWh57TMx0Le7s/zhEYLls7IhtWI/FLTI6eOktdb3a1hUlOEXW3+7cXIkjSQ0+pvsn3F14M4pNZ0d7+nN4PLT1jQcz9Ei/XHUuvg0pH3A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663838262; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uuN0RvFNXbfYw9v0uWvsWxRBJlewlxQT5whcowWTn1k=; b=IjwwLwz6odCqn967jutvJLYPqof7uE4bZcEmxP00VwgTJ4bEChHFbJvMQHHI7thooAS3W11SEzwsNFGlSBmIyY/ZEuGN39tl4jHhYyX/XMnE8vUx/QsCt+3qOuzG9gYlbew4vfhrsNTfw6kFMhNyaq7jHfIfpipccOqcxj2amng= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663838262495621.1770212791764; Thu, 22 Sep 2022 02:17:42 -0700 (PDT) Received: from localhost ([::1]:39072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obIKy-00012M-Pu for importer@patchew.org; Thu, 22 Sep 2022 05:17:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuO-0004YK-51 for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:25385) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obHuJ-0003Sh-Mz for qemu-devel@nongnu.org; Thu, 22 Sep 2022 04:50:09 -0400 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-657-dNpzcFBzO0aqzPtIMnov-w-1; Thu, 22 Sep 2022 04:50:06 -0400 Received: by mail-ej1-f71.google.com with SMTP id sg44-20020a170907a42c00b007822e506a4fso1424923ejc.16 for ; Thu, 22 Sep 2022 01:50:05 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id ay21-20020a056402203500b0044e9601e53fsm3245515edb.19.2022.09.22.01.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 01:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663836607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uuN0RvFNXbfYw9v0uWvsWxRBJlewlxQT5whcowWTn1k=; b=WGvq/u8TOlyvL5vaoUjbs7C5IbisbT4aVMiFLHxW2KxS1Vt9rJGTydvdPdybs8P0fwTLqx eWLXe8kV01Ogl44n4G1vaa78vsTM4j4po2x6ZHMzQ9fClR5uRNXz/4YGHcC1YTybbrS5T0 0m6b7yZHDaOLKJsUpjqDig3puZF850k= X-MC-Unique: dNpzcFBzO0aqzPtIMnov-w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=uuN0RvFNXbfYw9v0uWvsWxRBJlewlxQT5whcowWTn1k=; b=KuCJ9BNKae6U8rUupCrIf8bmrf0cPdRjY1UWFVyG8r6ALT3vRYj/R4BYyFPOmu6UMK gWH0b3vevHDgSQ8r4ngbDXVvlkKPxlXaS9mwNSkm+Kg8o08RSwp5tgdVW9iiSGseyEdf PGB9s5Aryse8bRkWvewdCwkYPNe660Hq9aepKDiu+s+yDqF8WJUCBmUfY0n/LrQ3Baeo YUYOypQn8cjXtYLGWC8v219C/df3S2H3gNtXBXI7Ri4be9ZhJ1Bbub7usbDLORl2ixm8 w+HyNTPfrMB8/Cyaf1I4kAWsZ/BiueXVWjqueRf7CqSQ+CZfv5Bx9m76iaRy5VHB+RAo aQhg== X-Gm-Message-State: ACrzQf2e8nlULkYWE4xUspsROjVG7Zz0q/Nrb8nUSLYEpHl+5HVOqTH8 E/fUWOFNvklGL/1XbBjYcijILPhFbZsLhAdTBv/ldksAcHdGpnhsVGKVB4iJeSJGmiUknijHzXu zjtx6sQM/9f8pol4DfaPOnmKNkXOvToU406dWrfuB8yRaZtS5YG6hc2GR2Oy+eN+LMV8= X-Received: by 2002:aa7:cc8a:0:b0:446:7668:2969 with SMTP id p10-20020aa7cc8a000000b0044676682969mr2174205edt.206.1663836604751; Thu, 22 Sep 2022 01:50:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7pLAvwf+3SaacD/apDxGVUbFaLB4YCRVvPm98M6zxzUTlF3+yMoHngapqE8s2NTcDXGaEuHQ== X-Received: by 2002:aa7:cc8a:0:b0:446:7668:2969 with SMTP id p10-20020aa7cc8a000000b0044676682969mr2174187edt.206.1663836604533; Thu, 22 Sep 2022 01:50:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, afaria@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 26/26] test-coroutine: add missing coroutine_fn annotations Date: Thu, 22 Sep 2022 10:49:24 +0200 Message-Id: <20220922084924.201610-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922084924.201610-1-pbonzini@redhat.com> References: <20220922084924.201610-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PP_MIME_FAKE_ASCII_TEXT=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663838263136100001 From: Marc-Andr=C3=A9 Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- tests/unit/test-coroutine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c index aa77a3bcb3..e16b80c245 100644 --- a/tests/unit/test-coroutine.c +++ b/tests/unit/test-coroutine.c @@ -610,7 +610,7 @@ static void perf_baseline(void) g_test_message("Function call %u iterations: %f s", maxcycles, duratio= n); } =20 -static __attribute__((noinline)) void perf_cost_func(void *opaque) +static __attribute__((noinline)) void coroutine_fn perf_cost_func(void *op= aque) { qemu_coroutine_yield(); } --=20 2.37.3