From nobody Mon Feb 9 19:11:43 2026 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=1665665778; cv=none; d=zohomail.com; s=zohoarc; b=LCIPcYGIBjP6InYMTkU0D8rWciv7srdUwwy4jBg3qee1Ua6t8X8Y+pg22dXBvQnn3e/vsxzXxTqx4ZWLvwDvx2YIPPl9DiGhUTE6D3y72F9HtRQJZu6YYeyXpw0lmZM4/LIqX2dbGUg49VT9E6fJl3YnHv5+xqfY6zIb6sjigG4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665778; 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=nvPbeyR3iC5ZpngBtqEB9ftpVEgqxKy5BhkU02l0abI=; b=Y4MLTJLYiCBpOOVRtkyPEgbkCnMCsS0lbD9Xg1WRrLpZHJcTSSk3AHDWAhxFyeureojsCt2XKrGy91kq9isCmKThbTRadYG7sod97KABw5zAiusn+ebANbhhcUKiumEJcjWsDL9wttgGGi2pbQpykXTNcnMFclQTv1MGq/ACW2I= 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 1665665778031576.1623181182764; Thu, 13 Oct 2022 05:56:18 -0700 (PDT) Received: from localhost ([::1]:60950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixl2-0001NS-N2 for importer@patchew.org; Thu, 13 Oct 2022 08:56:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSs-0001Tg-Aq for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:25876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSo-00040M-VV for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:28 -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-96-IUsnCF-TPXuHuU2YIRSahQ-1; Thu, 13 Oct 2022 08:37:19 -0400 Received: by mail-ed1-f72.google.com with SMTP id y6-20020a056402358600b0045932521633so1415825edc.17 for ; Thu, 13 Oct 2022 05:37:18 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id k20-20020a17090632d400b00772061034dbsm2939260ejk.182.2022.10.13.05.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664640; 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=nvPbeyR3iC5ZpngBtqEB9ftpVEgqxKy5BhkU02l0abI=; b=Uqy/wrCLsTZrh7FJkJY2sSG06tLV/EJ6Fa6sW7vek9Ougjsxlf89JKisKy3UfAuDVbMuwH ZJRjcUu6xtrddf249epDdwZ+MdMmlmfLcC68Y2586lq+ZKiFE/XSlck3GfF20VngRDA6ob 2GP2JwvftZDX8B8x7K8jefqZhDD05vM= X-MC-Unique: IUsnCF-TPXuHuU2YIRSahQ-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:message-id:reply-to; bh=nvPbeyR3iC5ZpngBtqEB9ftpVEgqxKy5BhkU02l0abI=; b=NmIvK21r7gN0fUKkQijyQ7PaYANI0Mi0MjTP1uvmteylhzWD0SAV+cFA4E3sLN/apR Onk+U+zinQ4E+q4qYhHVgPBSZr/YyI13ftDqqLoL9bi/t38kkviBnMeey4PTJQEfu03s XokzPUlpQi2b0ge4Lhs4Lz0jakGbvWxAfIdte4PpFZ1OKu4XB7bJUN7imKioaH7NJjPv YERKHWlxZuUvyjJBMSAnABVEknhHfePh5aFiuO7bZc/dh5ZBxoXz/Y4y19iaEpo4wL7t qTQLCgpnHyGGPGRDnpyilRKvNRwvjncQgxHyQhwNJmepB2o2EKYp+V9ET7JY7Kh715Zl +Vlg== X-Gm-Message-State: ACrzQf2/HoGV5JaBiHDsPn6F01Ee7k8hqt78pTJiGS/Gwz9n1h7jMNQh mgSxY9ANSWwwQ3YDEx6VM73VMatf0+4L1EClpvvfKKAKeOVNU/MbP7MOKaWRAp4JqnTVizm0baB TEW0WSiXIhRYm+5Pv1hgflv032DfvRb11YdMLfP8cigRxxUXkNz2ybbO9ipkHWnM3MjU= X-Received: by 2002:aa7:c144:0:b0:459:f897:793e with SMTP id r4-20020aa7c144000000b00459f897793emr32145158edp.8.1665664637423; Thu, 13 Oct 2022 05:37:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/FwaBrabrjGHsBugl8llV0etFYA+JNOkVHbFEwX/XYPEn4ebz2/gUkPdXxrAqlUHrEzSx2A== X-Received: by 2002:aa7:c144:0:b0:459:f897:793e with SMTP id r4-20020aa7c144000000b00459f897793emr32145134edp.8.1665664637227; Thu, 13 Oct 2022 05:37:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 01/24] backup: remove incorrect coroutine_fn annotation Date: Thu, 13 Oct 2022 14:36:48 +0200 Message-Id: <20221013123711.620631-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665665779099100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria The .set_speed callback is not called from coroutine. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index b2b649e305..6a9ad97a53 100644 --- a/block/backup.c +++ b/block/backup.c @@ -309,7 +309,7 @@ static void coroutine_fn backup_pause(Job *job) } } =20 -static void coroutine_fn backup_set_speed(BlockJob *job, int64_t speed) +static void backup_set_speed(BlockJob *job, int64_t speed) { BackupBlockJob *s =3D container_of(job, BackupBlockJob, common); =20 --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665665137; cv=none; d=zohomail.com; s=zohoarc; b=Ec7jnucdaUEqUWiVR9P+rb2JDS/Luj9whshy+MFIVzY38c7vw38tQ03LxD3H2A9JMwTF05vMSIU5cXVPBB1D4DZr4AW6tz1kMZwUsAmeJVSuWcXUFNd/+npNq1GVoE7HqAPNm6gL0O4qcYhLjg+eFgAWr3j9Ow7/iaBWGi15jQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665137; 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=YIetAdnpI8D+qyv00c/9xWcDCY1sjCYTaxA6hToEUXQ=; b=NG9m+lMztXFwgULoTXErsYgUNUdt1/aRjxgEqBGaE/DGtCdgk9Ef1aw3fyhDzTKaVEbMlKFuyjm2VxbSmia0JpeSHNwplZhbV/U1aTOT1OFlz53hV33zRer3mA+1yLclax2qYdmDtt3Lz9nryBJz88h3NPFV8u0G+Ws6OdKU+F8= 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 1665665137410114.35337248891267; Thu, 13 Oct 2022 05:45:37 -0700 (PDT) Received: from localhost ([::1]:51438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixai-00080w-0x for importer@patchew.org; Thu, 13 Oct 2022 08:45:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSt-0001Ue-De for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44488) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSp-00040e-Kh for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:30 -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-582-nrIF_gWVMieMiZ9XNfQ6rQ-1; Thu, 13 Oct 2022 08:37:21 -0400 Received: by mail-ej1-f69.google.com with SMTP id ho8-20020a1709070e8800b0078db5e53032so829038ejc.9 for ; Thu, 13 Oct 2022 05:37:21 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id 17-20020a170906219100b0073d71792c8dsm2926580eju.180.2022.10.13.05.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664643; 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=YIetAdnpI8D+qyv00c/9xWcDCY1sjCYTaxA6hToEUXQ=; b=SgqAg+T9kPREgdbYL4FQ1YxbLsDn1DenuDKqnSJIXDIu+fprDTfYduA+7wbZfUBeAoEofp v+M1qEG+ZCjapvJqkRJsryKmULC6tIzGhyrYOQ/XMTYi8I0PxUktbeSWy4/1FQAgQs18xS GJPFZm3T7r0x7phbnozBcA0vDcg5hw0= X-MC-Unique: nrIF_gWVMieMiZ9XNfQ6rQ-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:message-id:reply-to; bh=YIetAdnpI8D+qyv00c/9xWcDCY1sjCYTaxA6hToEUXQ=; b=O9yYl1WIsq8TpJEt0A5Oy0kTVjv+WUMsUTq38CXnfwzjHYBe5qtthvNsg0hyIBsSJ0 n8T04JtvMoQ975VIU59kuCTX1k2YPlArDFGOdes79PJ2HfKnZV+TBTnNPFrcsfDBC+XY oYvDwru59b2hWwYvQyEaO8JvthZX+N76JIDApjAjPXI5u8j2n9OfCKgjWB00mos3IR2n u4G7Bwx6Vx/i8MhjI9+HDSW0352XgJwL1svRxqKXNQkIl9u2wdrLtfj3dxUzY+IfJkyL o7gFxNxdVJytHow4GDjao/Y4iP0S7E4y0YNoWqd2XdR2W4KHLHZWfXWVtc1vsLcnMhhF CEzA== X-Gm-Message-State: ACrzQf0wSVnfMuV9tZmByDFiHjHA7dxXXgWY4lbG++B6MdE9Nng+88QD le2NaD7909RjtXfPZ1pIcWVsPcJIp0tipwGPrFxDjg/+bhd53yNtVClefnGjzzqduatOicElJiS NSjMtDU/6+3hNbiIc8lFsv3uSz7LMezZ9A/9PXD8R0jyTJX45mgkumYek6oF6CS4ha/U= X-Received: by 2002:a05:6402:1e8d:b0:454:79a9:201f with SMTP id f13-20020a0564021e8d00b0045479a9201fmr32479933edf.176.1665664640416; Thu, 13 Oct 2022 05:37:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ZCDpKcMMuag0627gqqxTmy9QJiqwkJHvwyVIlmk2zYXo3/hRdeQ9sskHtjFot4iGjaT8zqA== X-Received: by 2002:a05:6402:1e8d:b0:454:79a9:201f with SMTP id f13-20020a0564021e8d00b0045479a9201fmr32479915edf.176.1665664640152; Thu, 13 Oct 2022 05:37:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 02/24] block: remove incorrect coroutine_fn annotation Date: Thu, 13 Oct 2022 14:36:49 +0200 Message-Id: <20221013123711.620631-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665665138202100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index d30073036e..236b12da2a 100644 --- a/block/io.c +++ b/block/io.c @@ -2739,8 +2739,8 @@ int coroutine_fn bdrv_co_is_zero_fast(BlockDriverStat= e *bs, int64_t offset, return (pnum =3D=3D bytes) && (ret & BDRV_BLOCK_ZERO); } =20 -int coroutine_fn bdrv_is_allocated(BlockDriverState *bs, int64_t offset, - int64_t bytes, int64_t *pnum) +int bdrv_is_allocated(BlockDriverState *bs, int64_t offset, int64_t bytes, + int64_t *pnum) { int ret; int64_t dummy; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665665227; cv=none; d=zohomail.com; s=zohoarc; b=AFs223yuSsucUfadP5RsUoNvfucuVUm8YHIU6pr7sIuSYz5xRh1eh97P1Yi9FkasNlowFEHjei1KFyhjrj6gpJ1OsZYk5K8IilldTRntzylNEVxD1vrhqnnKT5MHpnzrh6JjGTEai3ZKiMrajUrk06W10L6lsCs/75bzkzq+vZw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665227; 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=XIg/1tSQpwCe51NMjGVlpyysqmXNOpMa52QyA5cBDRk=; b=e3R23K0sTsibPGmgw7Cz6zYF+y7zW9wSlPzafa7DRfawu/q+QqkWtT9ngsnhYqLGov/5tqD1RKLe1cR1WT5ZAFtdAycyelgyPw7I0i+AhtYHV8LPsC95zd997T8TbGpHN3rS9FJCH6SvSbB44+rDyx4pfFYdr/pRL3WUIQ3QWMA= 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 1665665227714478.48701576388953; Thu, 13 Oct 2022 05:47:07 -0700 (PDT) Received: from localhost ([::1]:57104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixcA-0001k5-1r for importer@patchew.org; Thu, 13 Oct 2022 08:47:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSs-0001UK-Lo for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSp-000429-Ch for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:29 -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-664-KeebTsV9NUinT0AQSUkDnQ-1; Thu, 13 Oct 2022 08:37:25 -0400 Received: by mail-ej1-f72.google.com with SMTP id xc12-20020a170907074c00b007416699ea14so824247ejb.19 for ; Thu, 13 Oct 2022 05:37:24 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id l10-20020a170906078a00b0077205dd15basm2959251ejc.66.2022.10.13.05.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664646; 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=XIg/1tSQpwCe51NMjGVlpyysqmXNOpMa52QyA5cBDRk=; b=UCwK4bnZHmTdCSDHvqf55gaLafj80w0kC4PG68JgaVnQ6Q42QeT1o/2QnDu4UaHoYV117N sJPI1vCgL9+Ppj4oSck6tOgpCAya7UmijqOaK3Dm4oWle9l98KZ+BcI14qmAUogD8hAjLK IfeRpX/JvOQw400zeiHbQEoFP9YYl+I= X-MC-Unique: KeebTsV9NUinT0AQSUkDnQ-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:message-id:reply-to; bh=XIg/1tSQpwCe51NMjGVlpyysqmXNOpMa52QyA5cBDRk=; b=hitoKGbJk4tUS1XPIgXeExTf4Up/gDyce96BZYf0xYuXA2QiMFjrUg1aGTsY0aRHIE PK5/c3hg4tRUTdfdf9QRp3ZyrklfajlGUA+d6lW5DK3uYMK8EZwCkaXSN8PTw/ekPBwR Otm3SbpTcyyh/rJUY8QNP/dn7G0Pe5oozGL6kFre9muZNkdGvlRUP+1Afyu/JXqXGS2v kufDcHndMPUMEVzWDGLmKGbZKdFyVIrOlLWkoL5R07q8I7yU3lotre3ixomKabCeJzdC j1WDMT9IgsRkwHC54tg68nwmZthdc6ehtk1lrrwijnQqkKMQoPjLF+vVEC7sWTm+vML0 XiFA== X-Gm-Message-State: ACrzQf1RFKWr3hT6lKQs9ECZ1RXG5S/xriXnIN8SeOMyTf40ct/1yE4v e+FO4MWWs7HB98HD5wsyGhqroZNR5uEEB8RW/t2TTYJMXB+Y05IKprX8184yqayZIuxlziaAL0L bPq5mDkXX9UQCBDgGmwAQf/JRJgFyZ6goosWlFmMAkNEx90RccMfpKb2juaMR48nepvI= X-Received: by 2002:a17:907:1b0e:b0:72f:9b43:b98c with SMTP id mp14-20020a1709071b0e00b0072f9b43b98cmr26762249ejc.710.1665664643328; Thu, 13 Oct 2022 05:37:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6cFgAfC0gVqLcs5sg0KfwAmHWmYP7xTL1BgKn2Tl6vsijS7fyhiPSnNV+baVkkn1SPpw9QVg== X-Received: by 2002:a17:907:1b0e:b0:72f:9b43:b98c with SMTP id mp14-20020a1709071b0e00b0072f9b43b98cmr26762234ejc.710.1665664643032; Thu, 13 Oct 2022 05:37:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 03/24] monitor: add missing coroutine_fn annotation Date: Thu, 13 Oct 2022 14:36:50 +0200 Message-Id: <20221013123711.620631-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665665229615100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria hmp_block_resize and hmp_screendump are defined as a ".coroutine =3D true" = command, so they must be coroutine_fn. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/monitor/block-hmp-cmds.c | 2 +- include/block/block-hmp-cmds.h | 2 +- include/monitor/hmp.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c index 939a520d17..b6135e9bfe 100644 --- a/block/monitor/block-hmp-cmds.c +++ b/block/monitor/block-hmp-cmds.c @@ -489,7 +489,7 @@ void hmp_nbd_server_stop(Monitor *mon, const QDict *qdi= ct) hmp_handle_error(mon, err); } =20 -void hmp_block_resize(Monitor *mon, const QDict *qdict) +void coroutine_fn hmp_block_resize(Monitor *mon, const QDict *qdict) { const char *device =3D qdict_get_str(qdict, "device"); int64_t size =3D qdict_get_int(qdict, "size"); diff --git a/include/block/block-hmp-cmds.h b/include/block/block-hmp-cmds.h index 50ce0247c3..ba0593c440 100644 --- a/include/block/block-hmp-cmds.h +++ b/include/block/block-hmp-cmds.h @@ -38,7 +38,7 @@ void hmp_nbd_server_add(Monitor *mon, const QDict *qdict); void hmp_nbd_server_remove(Monitor *mon, const QDict *qdict); void hmp_nbd_server_stop(Monitor *mon, const QDict *qdict); =20 -void hmp_block_resize(Monitor *mon, const QDict *qdict); +void coroutine_fn hmp_block_resize(Monitor *mon, const QDict *qdict); void hmp_block_stream(Monitor *mon, const QDict *qdict); void hmp_block_passwd(Monitor *mon, const QDict *qdict); void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict); diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index a9cf064ee8..dfbc0c9a2f 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -15,6 +15,7 @@ #define HMP_H =20 #include "qemu/readline.h" +#include "qemu/coroutine.h" #include "qapi/qapi-types-common.h" =20 bool hmp_handle_error(Monitor *mon, Error *err); @@ -81,7 +82,7 @@ void hmp_netdev_del(Monitor *mon, const QDict *qdict); void hmp_getfd(Monitor *mon, const QDict *qdict); void hmp_closefd(Monitor *mon, const QDict *qdict); void hmp_sendkey(Monitor *mon, const QDict *qdict); -void hmp_screendump(Monitor *mon, const QDict *qdict); +void coroutine_fn hmp_screendump(Monitor *mon, const QDict *qdict); void hmp_chardev_add(Monitor *mon, const QDict *qdict); void hmp_chardev_change(Monitor *mon, const QDict *qdict); void hmp_chardev_remove(Monitor *mon, const QDict *qdict); --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665665580; cv=none; d=zohomail.com; s=zohoarc; b=DhB9PNEwzywyMfarPjtFVJfGftMt6j5/RsV1r2pdVaCKr+Q2GTo2N8DPnjGLSWyhcyKDETai2auWZFfQvdFE9du1rSg67AVIuX+tclpaKpZSXwQ/UES+t1XectWp0rF9J+x5gK2bDaOjnPMQKqmTL/BHcSjLkM4VxjjFdzObn48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665580; 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=YaEsHZiiA9mFtPtxQkW5psgLocTBBIsAORT10EacUr4=; b=Ub9U+f8RygneC0Yqi5zJ2pOjcUkP/Ioj3PwLwuw448Ag1RAtf0tfMkGVHQLJ1tulcRqwxAJHhtJqMFcgsihGc6SZsCK6QwWXvKpvn4/GelLs9bY9GgMOdUk/6lFe4kAUO0lTzB8+OyFrR0ebXrHV0W8db6+RwnSZP9Pxv5zwJmc= 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 166566558091070.47343483608415; Thu, 13 Oct 2022 05:53:00 -0700 (PDT) Received: from localhost ([::1]:36966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixhq-0005p3-6a for importer@patchew.org; Thu, 13 Oct 2022 08:52:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSu-0001Uo-5V for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSr-00042e-S9 for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:31 -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-670-dv8x64jwNFuWEp8oGw7ijw-1; Thu, 13 Oct 2022 08:37:27 -0400 Received: by mail-ed1-f72.google.com with SMTP id z11-20020a056402274b00b0045ca9510fc8so1411435edd.23 for ; Thu, 13 Oct 2022 05:37:27 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id y10-20020a170906558a00b0073d796a1043sm2931970ejp.123.2022.10.13.05.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664648; 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=YaEsHZiiA9mFtPtxQkW5psgLocTBBIsAORT10EacUr4=; b=cWPsy88FfHgGqLQarkpyCPR/BzuOXjw2uy/JyfwGAhjsiHsL2efmpn9iSHjmMCxPj3pX6q pw6A2p7T3XnJE2oyQuruU2AdcFLQOX7T2a3HzEYcvcPTroXmkEsdAkae8jtrWFZd7UhIRA eCqaI7SYWOrnPqcslyNuWNEINiDVDwU= X-MC-Unique: dv8x64jwNFuWEp8oGw7ijw-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:message-id:reply-to; bh=YaEsHZiiA9mFtPtxQkW5psgLocTBBIsAORT10EacUr4=; b=2TERc/zRlbkxuM+IIS10W/bw6LzMTMAswJ0uZKEEiXjFpU+xny2+6nuNRqByqtZ9H3 QS+BGYECEYLK1KXmR5yI+Sf0VHiRylkIEoMbGGxgNQDfBI3zCpH4112Q5l4AYeP5QNg2 mABecJrNvrhb0mVmz4igGT4OjiwYk69xLpzJBAXH832lKNkRA96B4mf40oGVxPyBfblY VHjqkwNu7mMH3xxr4LG73289mKTb9ZuO/2ibS+hcDhs4HSxEQWOkEcWpgAHPsLLned25 UyUxjjAszwZfUZuePYROyE9DN8T8vI7ukW9TI2MBAcktATTzaIcS6oxJnDFcCeouSMp6 mYIw== X-Gm-Message-State: ACrzQf35PmaJOK0uY64PaL7bVtXRS5Xk5OElp6Z45SMLzpyBxYxVR5XH dmNv+4VGatPNA3MOYdSSDtU/+tiwd5uzhsNo6X/bd+X9gW7JQ1taWsaYiTt7MVwzclwcMaa/Sd7 m5pGY/ydQvdiY7tyaflsbD0MZM2jIhGHsJPYK7DkKj3HFocJ9jw+v1XjGAojwvBRsZBk= X-Received: by 2002:a17:907:724d:b0:78d:acf4:4c57 with SMTP id ds13-20020a170907724d00b0078dacf44c57mr17032802ejc.516.1665664645944; Thu, 13 Oct 2022 05:37:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7JEmqJF2BazrM7Pb2ehM0TNcLYLsFQUHF5Sf5ycyElxqDnqbev1Rd7VkNBBXQ7laVu2M6qLg== X-Received: by 2002:a17:907:724d:b0:78d:acf4:4c57 with SMTP id ds13-20020a170907724d00b0078dacf44c57mr17032792ejc.516.1665664645677; Thu, 13 Oct 2022 05:37:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 04/24] ssh: add missing coroutine_fn annotation Date: Thu, 13 Oct 2022 14:36:51 +0200 Message-Id: <20221013123711.620631-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665665581305100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria ssh_write is only called from ssh_co_writev. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/ssh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index a2dc646536..ceb4f4c5bc 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -1129,9 +1129,9 @@ static coroutine_fn int ssh_co_readv(BlockDriverState= *bs, return ret; } =20 -static int ssh_write(BDRVSSHState *s, BlockDriverState *bs, - int64_t offset, size_t size, - QEMUIOVector *qiov) +static coroutine_fn int ssh_write(BDRVSSHState *s, BlockDriverState *bs, + int64_t offset, size_t size, + QEMUIOVector *qiov) { ssize_t r; size_t written; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665666149; cv=none; d=zohomail.com; s=zohoarc; b=W1fh9U10S/z+b7ftwnLYuQQBxrctgf49/CuQ+MP3n1aH2HGgbJzK7dz+aftdsrcQ92byMYEKHJwCp3bY93KajPaxaJitIe92KelI1oyFd63XyFatvxlZE8WnMnRGs4lPjCnCDt9Qla+TUBHSgXCs0wV0uT0fXJpecenRZGqIUrk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665666149; 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=MgW0FJhS1AR3ZxmsZrbLa+Ggxo1fR+5TjfuCh1jGz8E=; b=VIJbDq6yVjpbcON3p5CXs8qP451wxZbgMzhkTi0IoyeRRSb0KHQ+WA1/alXgwLVJsIGOD4VhKzaQCUUul1NtwyTUDEXoTPFzVu4b954bF8sgT4/zF/UguQyoX103scD87wbS2dg4C+edvDu7hgFURVf4/ephA+CCkIE2uw1z1Vc= 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 166566614906488.86366118480953; Thu, 13 Oct 2022 06:02:29 -0700 (PDT) Received: from localhost ([::1]:44998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixr0-0007yk-Qp for importer@patchew.org; Thu, 13 Oct 2022 09:02:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSw-0001W0-1g for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:29166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSu-00043j-0g for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:33 -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-665-pYoXuSjCPsGalUZQoshp8A-1; Thu, 13 Oct 2022 08:37:30 -0400 Received: by mail-ej1-f72.google.com with SMTP id dt13-20020a170907728d00b007825956d979so833229ejc.15 for ; Thu, 13 Oct 2022 05:37:30 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id z1-20020a50eb41000000b00457c85bd890sm13260388edp.55.2022.10.13.05.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664651; 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=MgW0FJhS1AR3ZxmsZrbLa+Ggxo1fR+5TjfuCh1jGz8E=; b=ETnQqnbQWRr839CP2GggJmYTQlMxGoX1GfTTwtTG6eoKMLGoZjE2l2sH1t9UcVqU40Ll2L abst3PEXuaYYiZ1DlRk3XVysP6gBSNBM5OZraAjo4TojZwxt3a6/TUjOJ14b02UFGWs9kV DYsBdBy+m7yATgPflze2uyqKcpl78I4= X-MC-Unique: pYoXuSjCPsGalUZQoshp8A-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:message-id:reply-to; bh=MgW0FJhS1AR3ZxmsZrbLa+Ggxo1fR+5TjfuCh1jGz8E=; b=Lxb3d1rb/0fz1rgn5t0fLufPV6BdKiW/G2EkYwfejCo5npnwGs90VuyuyZPOiDrx6N bvXfckl3jaDkBXMckx4HU3CYtH7J74+qplE2aLqUCgeQ1v2am0DVL7pKZnL5GLKnX4T9 Em7fPqs97FvuEvVlnUzckn+rpkiPMMGhKBQH1JLL06NMqN0jj2nuRH3tjkhK+j3peuap liFZXLB2D24GKyfrwIwXRfq/mu/00+8YF2VHr7pv6X6+azHAhICWmpn3AIMlK3K393jp EocAknAJgaC+IBJr2MINSd7SE01StC+Aeq1vSTQpVapr6U7hRp40W2sqNhiotPBRDOO0 +xKw== X-Gm-Message-State: ACrzQf0vWBbD/+GwpsxnLI35WLoAYxp5NPvmvxV7rk55wyK8jLZ3qptu at6lYtx9Qh/mlwrXAVrDvdKAZKG9v4Y3V+T2glBnkZstDlndZa0dlczlar62FC3rxV7G+Qqdvzn UDHo53Fu+LgFUDkw5oaG06/yDgyMnjA+irLY5IEmlSJe/O9EjvmAzjNYsU3yCJBPAWuI= X-Received: by 2002:a05:6402:414d:b0:451:73f0:e113 with SMTP id x13-20020a056402414d00b0045173f0e113mr31926437eda.207.1665664648867; Thu, 13 Oct 2022 05:37:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4EOsGfwXGbXBZlA9NUA0vtOa3TbOu6gwAIqc6DbtSBIuGnonPuqlN9iii/PFBcYslP8dYM9w== X-Received: by 2002:a05:6402:414d:b0:451:73f0:e113 with SMTP id x13-20020a056402414d00b0045173f0e113mr31926423eda.207.1665664648621; Thu, 13 Oct 2022 05:37:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 05/24] block: add missing coroutine_fn annotation to prototypes Date: Thu, 13 Oct 2022 14:36:52 +0200 Message-Id: <20221013123711.620631-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665666150657100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria The functions are marked coroutine_fn in the definition. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- include/block/block-io.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/block/block-io.h b/include/block/block-io.h index 492f95fc05..770ddeb7c8 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -83,12 +83,13 @@ void bdrv_aio_cancel(BlockAIOCB *acb); void bdrv_aio_cancel_async(BlockAIOCB *acb); =20 /* sg packet commands */ -int bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf); +int coroutine_fn bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf); =20 /* Ensure contents are flushed to disk. */ int coroutine_fn bdrv_co_flush(BlockDriverState *bs); =20 -int bdrv_co_pdiscard(BdrvChild *child, int64_t offset, int64_t bytes); +int coroutine_fn bdrv_co_pdiscard(BdrvChild *child, int64_t offset, + int64_t bytes); bool bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs); int bdrv_block_status(BlockDriverState *bs, int64_t offset, int64_t bytes, int64_t *pnum, int64_t *map, --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665665734; cv=none; d=zohomail.com; s=zohoarc; b=GfN/HeZpsw+wOHHefsrpK50XfajxfnxxuxImDo2OugltsNW2X5XXx4vp2ACO1SyDvx5yjtELek2zfC8q4mKnen19xLX+gaIg3tMWS8ZYg0IZpK30BmhLvfD4VRDIWr6DO2Nrcip3HQjEutaZg+3xXgiae+w9VqySWW/BU2bOXR4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665734; 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=WdDoyT0lop3J/es469dq/DCk1xlE21mkYbcqsSC+DX0=; b=LtsQWqfqmtvXbJtRl7Cd36qG9adgo6Tri6TbWwqvgmkcLwbTl7nhry7eyduBl260o57iQR4d2+Y7etjPbqp49CenRApWY6dol0zMBGrM+uGHLHdDXUIZGa0u3no9r5NpeYzKqnje7znsquEZVkR744vBgU3Xv329AuyTdxzUPG0= 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 166566573432055.7075815934395; Thu, 13 Oct 2022 05:55:34 -0700 (PDT) Received: from localhost ([::1]:59950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixkL-0000L7-4e for importer@patchew.org; Thu, 13 Oct 2022 08:55:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSz-0001Wr-91 for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:43233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSx-00045b-Ns for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:36 -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-39-w8a-rmKzNhSTSQXl4Cu_EA-1; Thu, 13 Oct 2022 08:37:33 -0400 Received: by mail-ed1-f72.google.com with SMTP id i17-20020a05640242d100b0044f18a5379aso1420510edc.21 for ; Thu, 13 Oct 2022 05:37:32 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id p7-20020a17090653c700b0078d175d6dc5sm2902764ejo.201.2022.10.13.05.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664654; 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=WdDoyT0lop3J/es469dq/DCk1xlE21mkYbcqsSC+DX0=; b=KIn81dp07BH+1M+tniJbvmWhI6xzDn6Ba0CAy+YKkhXmm2e7HRN2l3Vx0Ue8XeA9x1mwdQ nYx5mNicF1aCVFtxauO8IVXlxo8g6YapRzZhkiKyyyrLk8soazHgEB/rAvOpSCV4L7+FVo iZCeN2MPzNO4Q9bg67+kPIhe0xT5bQk= X-MC-Unique: w8a-rmKzNhSTSQXl4Cu_EA-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:message-id:reply-to; bh=WdDoyT0lop3J/es469dq/DCk1xlE21mkYbcqsSC+DX0=; b=imIo8ELmyUzeza2hhwxIKS4fv3Pwr2RdIX2YozUM/owV5Zqlgcn3J5gYU2PaRwkzE8 3izwkVZDl7shraBozSsanGpAX9s2DuHg+BWQx7B1o2KgV6dsBmsxepds3M1WRSSVpWl0 QJXjQ8v8KHZmcZmfvZtet2CYC3KVaqA2cwz3uMD52rIizqk2IflJUuMDHm5l0rAXiVOj AF2C1H0933hDAXugSKAkiiiNhRyQ4Q54T9lZZ/efMCfQIusjEM6z1Qp5j/HtchpEy6Pu La94vOdByfyc5mvFqQ7uI3AUeUX0Fz8bdDONkR/IGNOoWogyLoABjpAGw5fmPAE490mf gyPA== X-Gm-Message-State: ACrzQf1s7XklXSp/AbNdKBU7P15dBboyeIr2l3yhCj3sREHPI1IZlU+f ckCSj9A84+E87qiSoLGwHOxWPRM+yOg6T608VmRTqZR9eJuArYO5DOe3/+EwWrJ7mcDD/JISr5Z NMpAYvIzkffRCJTm5WJ/R3OEkq/v960+zM7SmWH6OcqMWxdHH1qqJafcPKmiI+aX146I= X-Received: by 2002:a17:906:9c82:b0:781:5752:4f2b with SMTP id fj2-20020a1709069c8200b0078157524f2bmr25415489ejc.561.1665664651530; Thu, 13 Oct 2022 05:37:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6DQJlBZrnDp3dsbbIIJqLFiOqxzPqTOoh/03Vhrn3c0QE1K7INt9j5INmeaudMpCB4HB2ZMA== X-Received: by 2002:a17:906:9c82:b0:781:5752:4f2b with SMTP id fj2-20020a1709069c8200b0078157524f2bmr25415469ejc.561.1665664651220; Thu, 13 Oct 2022 05:37:31 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 06/24] coroutine-lock: add missing coroutine_fn annotation to prototypes Date: Thu, 13 Oct 2022 14:36:53 +0200 Message-Id: <20221013123711.620631-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665665734937100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria The functions are marked coroutine_fn in the definition. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index aae33cce17..d848489b65 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -276,7 +276,7 @@ void qemu_co_rwlock_init(CoRwlock *lock); * of a parallel writer, control is transferred to the caller of the curre= nt * coroutine. */ -void qemu_co_rwlock_rdlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_rdlock(CoRwlock *lock); =20 /** * Write Locks the CoRwlock from a reader. This is a bit more efficient t= han @@ -285,7 +285,7 @@ void qemu_co_rwlock_rdlock(CoRwlock *lock); * to the caller of the current coroutine; another writer might run while * @qemu_co_rwlock_upgrade blocks. */ -void qemu_co_rwlock_upgrade(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_upgrade(CoRwlock *lock); =20 /** * Downgrades a write-side critical section to a reader. Downgrading with @@ -293,20 +293,20 @@ void qemu_co_rwlock_upgrade(CoRwlock *lock); * followed by @qemu_co_rwlock_rdlock. This makes it more efficient, but * may also sometimes be necessary for correctness. */ -void qemu_co_rwlock_downgrade(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_downgrade(CoRwlock *lock); =20 /** * Write Locks the mutex. If the lock cannot be taken immediately because * of a parallel reader, control is transferred to the caller of the curre= nt * coroutine. */ -void qemu_co_rwlock_wrlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_wrlock(CoRwlock *lock); =20 /** * Unlocks the read/write lock and schedules the next coroutine that was * waiting for this lock to be run. */ -void qemu_co_rwlock_unlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_unlock(CoRwlock *lock); =20 typedef struct QemuCoSleep { Coroutine *to_wake; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665665482; cv=none; d=zohomail.com; s=zohoarc; b=QcNA2+ExYZG36nH1BCkxg9LnDRNR3lyc/7fYDxQL5tPOBkjYjoX8vA894MZrRI0qKno3Z++3HukBQhLDpOkA/HNTFQ+J8Khvh5GapN8f9+S1i+689NlSzI2awPNIj753XKgwoMR1SWs1iioVbw3aX5I9AHpEDKla5Mbldxn1KnY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665482; 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=BK9V7BF4FDWFPbVioi/6hP2ritYONTmY8uKeRXf0/70=; b=QwesYDUqDqF48bxnPxiZNR4N3/6rq0lCFQ8toHnwb5T9NR2kGz7+VaYM+7iCLL6pN+SaEMH5bKC0iPt/kOboklehv+uWzWXe22KFJIbX1HHlrr6fPH0W6VJwKWfBQjcGTzngG3RavYSgyt8iSqzFYb3U3LMU/vMLf7M0jEqkxis= 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 166566548243863.317655741584645; Thu, 13 Oct 2022 05:51:22 -0700 (PDT) Received: from localhost ([::1]:46494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixgH-0004f1-8i for importer@patchew.org; Thu, 13 Oct 2022 08:51:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixT1-0001Xw-1E for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:38178) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixSz-00046Y-Il for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:38 -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-79-AYMd0I9XPziFuCNUJf6iqw-1; Thu, 13 Oct 2022 08:37:36 -0400 Received: by mail-ed1-f71.google.com with SMTP id z16-20020a05640235d000b0045c0360bfcfso1407628edc.14 for ; Thu, 13 Oct 2022 05:37:35 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id d12-20020a170906304c00b0078afe360800sm2922825ejd.199.2022.10.13.05.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664657; 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=BK9V7BF4FDWFPbVioi/6hP2ritYONTmY8uKeRXf0/70=; b=fVOcmNEd1ffl46Udhl0UMeSq7hSPnE0pPdl/lcNSBsGqToLZ7WC/MG8tGWdC5vYDwdREEZ aHBze5Nyi69Zeb4Tat6LuLu6M+ekXaW+Ui4BQSHyIUxRjgEDsaeQk3vIrDVvuWkCZ2jmL4 PXnndqf5lFvQxdmmqULhyeDec9XIqIA= X-MC-Unique: AYMd0I9XPziFuCNUJf6iqw-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:message-id:reply-to; bh=BK9V7BF4FDWFPbVioi/6hP2ritYONTmY8uKeRXf0/70=; b=ljhaOlo7+dgKi0ux2IdD57J4QKA0WuPRK6BKJE7DHMSaM0SBrMGMwQ3cfloGZaME5t THVfJgusqF9JAQMRos5joVsI6+vdKVOo+ByLE+bXn24k8dvsNXH7/woLW9aGhLih2nbS eXHqkonqE0w54KSw5H99+p9lBSq3dbPc0jRJZ1Y04i2R265xQqmBfuKUr3xKDuIzHnJg 1hpTHU/d/VUXHKShTz93Rc4JugkE8CzbKKAj0WFa2LYhW9hhzfQAJwP/ercHZS/PQn5R k9Q1MMA8qoEFa4mdMIatkXmx+LvMbUuZJ4+L54fnD0813js3vvFSiphApJbuYXUcwSMG 4BSA== X-Gm-Message-State: ACrzQf20u9IJUNAGMnSSyqUex1wOYStpVjG8Y7wgGUNxtuRNsP3B+sTr xpeFUiwqatTZA8u/GlcifdyP1fLe5SgNHvX27CAvRFyTTi/m6cD7YJZZ8HJR4qhB9NK4+IzZAIs /5uzH8z3/iOPcJqzac9QoJxMeyVis4S1FB3CVuPCiTvy1pRO8UGlioFpzNRhrvQxq9gY= X-Received: by 2002:a05:6402:d5f:b0:458:dc7e:f728 with SMTP id ec31-20020a0564020d5f00b00458dc7ef728mr32499910edb.220.1665664654655; Thu, 13 Oct 2022 05:37:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4V4Bx/HddNnBFFCEgOTvvJueRMUhfCw+zOer3WoJLr9dI8xqN47c10lq3w55rUbhr+EGVy1Q== X-Received: by 2002:a05:6402:d5f:b0:458:dc7e:f728 with SMTP id ec31-20020a0564020d5f00b00458dc7ef728mr32499889edb.220.1665664654367; Thu, 13 Oct 2022 05:37:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 07/24] coroutine-io: add missing coroutine_fn annotation to prototypes Date: Thu, 13 Oct 2022 14:36:54 +0200 Message-Id: <20221013123711.620631-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665665484507100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index d848489b65..06d323143c 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -378,8 +378,9 @@ void qemu_coroutine_dec_pool_size(unsigned int addition= al_pool_size); * The same interface as qemu_sendv_recvv(), with added yielding. * XXX should mark these as coroutine_fn */ -ssize_t qemu_co_sendv_recvv(int sockfd, struct iovec *iov, unsigned iov_cn= t, - size_t offset, size_t bytes, bool do_send); +ssize_t coroutine_fn qemu_co_sendv_recvv(int sockfd, struct iovec *iov, + unsigned iov_cnt, size_t offset, + size_t bytes, bool do_send); #define qemu_co_recvv(sockfd, iov, iov_cnt, offset, bytes) \ qemu_co_sendv_recvv(sockfd, iov, iov_cnt, offset, bytes, false) #define qemu_co_sendv(sockfd, iov, iov_cnt, offset, bytes) \ @@ -388,7 +389,8 @@ ssize_t qemu_co_sendv_recvv(int sockfd, struct iovec *i= ov, unsigned iov_cnt, /** * The same as above, but with just a single buffer */ -ssize_t qemu_co_send_recv(int sockfd, void *buf, size_t bytes, bool do_sen= d); +ssize_t coroutine_fn qemu_co_send_recv(int sockfd, void *buf, size_t bytes, + bool do_send); #define qemu_co_recv(sockfd, buf, bytes) \ qemu_co_send_recv(sockfd, buf, bytes, false) #define qemu_co_send(sockfd, buf, bytes) \ --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665665865; cv=none; d=zohomail.com; s=zohoarc; b=JzkMJS4IafNCYhSaCMEIfXVX3elNjQlvTke4WoBrvbuZ/mSAQmKGDh+BKXoySb0+4IrgCSs5/4pNcLVeKCy7VxtqJ0DyDN+WPuJIXR4Dn+lMitAGkBjZGCu8KCKX7xkQDhELBLBd1Kn/XNb4cbl46W2aBLivmy30OfpUB1CWXao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665865; 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=vPMZJNlEf3JbCTvB/GnlZ412UQC8xpJaTx7rZhN7KYw=; b=HeTYreMMU3MBugJdQ9KN14AHZK6vCUPEYrxkV+q8i/b6EBpSc4Kd9Q4Vo1rFTpv4uBYgPXtu2DRHJ/dyyLk5fE8/ZTw0LbKFlbUKPAYgbmDg6CR+tsoI/079LCfyybf/Nz8X1edUHnLgyUtA2ZLcKN7WZPeaqTR+KUlGGhHEiqE= 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 1665665865923320.81266504184384; Thu, 13 Oct 2022 05:57:45 -0700 (PDT) Received: from localhost ([::1]:43756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixmS-0003Gn-Kk for importer@patchew.org; Thu, 13 Oct 2022 08:57:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixT4-0001Zv-6p for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:23530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixT2-00047R-Sp for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37: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-533-zKUp_-VEOjaJgZvDGftk1w-1; Thu, 13 Oct 2022 08:37:39 -0400 Received: by mail-ej1-f72.google.com with SMTP id hp41-20020a1709073e2900b0078e07dbf280so824382ejc.7 for ; Thu, 13 Oct 2022 05:37:39 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id lb5-20020a170907784500b0078c468bd604sm2981324ejc.57.2022.10.13.05.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664660; 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=vPMZJNlEf3JbCTvB/GnlZ412UQC8xpJaTx7rZhN7KYw=; b=UJvPd+9ujbum6x8DiIzF5+SmnSas15NQckJYh9CedjWOUwtTW2mNSI0VhyNe5tliEromyw /Yz9i2Rg/6TGhXq1H7ap62Cso9pHnAbX2lLruVE721OILS2+rfw3gVzpJD88sEhq6jdQim 7gKeM9zw9pwT6gNvHYWt3j0tV7WpF+w= X-MC-Unique: zKUp_-VEOjaJgZvDGftk1w-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:message-id:reply-to; bh=vPMZJNlEf3JbCTvB/GnlZ412UQC8xpJaTx7rZhN7KYw=; b=bAIh4ewEfKJbC/bX3ClWpW+9VJdi0f8ziG7+enggRTSLCVQTJJhqgi56bWVlhCH7E9 uXym3gFvs9lFQUnjKwo2MrKNFvyGTHUHcUjGvyIS5KnlCSWjB+SZpxU7NuMJPQagQ/IC gZwHPweEVidPhKWaADE5J8BPA78PkcsIFYtlQQQMG6oNt5y1XxcK2ORbKdxB8g4/wc3s Xn78tU9vduoKtaMvzkHpwh54AVNlvY8DvactBfqWx8MMrXn6HNQ+UkLNanjDaj+nXgXl PQMMoiViAZFB6LwK7QJ1irKbFI1RHGdX1fuIlLytsXKkjzBwzeRrOdXEFY+Pf1PL1L6M LNcQ== X-Gm-Message-State: ACrzQf2v967yn2XaoP1VQzb1GL8Q15TGCKTZ8YVsIrn9t2LtLLGWxrLG jc2rOGm8x897YJ73xLhLgFzdXK0A/B7DvL9PmwgcSUmrcNfgb9B6/XzRE8RorVaBXBgSr4eqSiw 50dBkrUtAPt3sVBegaHapamKOIbLYBKK1Y25WdpI43k5Duh+fkP6N2Dts1OTy/8pIZfE= X-Received: by 2002:a05:6402:496:b0:443:a5f5:d3b with SMTP id k22-20020a056402049600b00443a5f50d3bmr32788056edv.331.1665664657596; Thu, 13 Oct 2022 05:37:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4PiIw+Li4443xUXUZjv5vbstT1IAuSydqemu/0ksaB8FPW+TJP1Qn98Z+ZPVLPbxSAPmNmHA== X-Received: by 2002:a05:6402:496:b0:443:a5f5:d3b with SMTP id k22-20020a056402049600b00443a5f50d3bmr32788039edv.331.1665664657316; Thu, 13 Oct 2022 05:37:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 08/24] block: add missing coroutine_fn annotation to BlockDriverState callbacks Date: Thu, 13 Oct 2022 14:36:55 +0200 Message-Id: <20221013123711.620631-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665665867217100003 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qcow2.h | 14 +++++++------- include/block/block_int-common.h | 12 +++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 3e7c5e80b6..ad6e7f65bd 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -991,13 +991,13 @@ int qcow2_truncate_bitmaps_check(BlockDriverState *bs= , Error **errp); bool qcow2_store_persistent_dirty_bitmaps(BlockDriverState *bs, bool release_stored, Error **err= p); int qcow2_reopen_bitmaps_ro(BlockDriverState *bs, Error **errp); -bool qcow2_co_can_store_new_dirty_bitmap(BlockDriverState *bs, - const char *name, - uint32_t granularity, - Error **errp); -int qcow2_co_remove_persistent_dirty_bitmap(BlockDriverState *bs, - const char *name, - Error **errp); +bool coroutine_fn qcow2_co_can_store_new_dirty_bitmap(BlockDriverState *bs, + const char *name, + uint32_t granularity, + Error **errp); +int coroutine_fn qcow2_co_remove_persistent_dirty_bitmap(BlockDriverState = *bs, + const char *name, + Error **errp); bool qcow2_supports_persistent_dirty_bitmap(BlockDriverState *bs); uint64_t qcow2_get_persistent_dirty_bitmap_size(BlockDriverState *bs, uint32_t cluster_size); diff --git a/include/block/block_int-common.h b/include/block/block_int-com= mon.h index 8947abab76..16c45d1262 100644 --- a/include/block/block_int-common.h +++ b/include/block/block_int-common.h @@ -731,13 +731,11 @@ struct BlockDriver { void coroutine_fn (*bdrv_co_drain_end)(BlockDriverState *bs); =20 bool (*bdrv_supports_persistent_dirty_bitmap)(BlockDriverState *bs); - bool (*bdrv_co_can_store_new_dirty_bitmap)(BlockDriverState *bs, - const char *name, - uint32_t granularity, - Error **errp); - int (*bdrv_co_remove_persistent_dirty_bitmap)(BlockDriverState *bs, - const char *name, - Error **errp); + bool coroutine_fn (*bdrv_co_can_store_new_dirty_bitmap)( + BlockDriverState *bs, const char *name, uint32_t granularity, + Error **errp); + int coroutine_fn (*bdrv_co_remove_persistent_dirty_bitmap)( + BlockDriverState *bs, const char *name, Error **errp); }; =20 static inline bool block_driver_can_compress(BlockDriver *drv) --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665669173; cv=none; d=zohomail.com; s=zohoarc; b=CD28sdNxRZz6St5EqY/GyrphQjRqblN/DMEU2x5PSgIFrTmR7Hz61lr6TWeX6NMScw3MaGOGqxAzNN1D3WQZ/GHnW24IWfbNCizUpoKCj4Wpx0RdAN4Dxy8omjcUUNvQag8RYV6zw71MNQjcXx4wgXdrS3mMfBmxhulcVuw31Dw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665669173; 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=PEjqbfSyEAtM0b3ifIeU6in3u3Xiw2yBc5yUjehkgcU=; b=nCsgbqiiIS37uwy9R+g8+SxSfK9Vp0jm+MyJKZZCEW0GLhANIk04A8qmM5Z1EcA8EgvdQwDrFSezpuAigXdbFbDYlAplOW6PNeHVGa2nEFs82i0+zJmP1BB5ltmT9/HT7+yEvZH77NXTUnkKGOZ+RZY22oFZJAzUr//osqCDTw0= 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 166566917324835.107590077922055; Thu, 13 Oct 2022 06:52:53 -0700 (PDT) Received: from localhost ([::1]:55312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixy3-0006Lj-0G for importer@patchew.org; Thu, 13 Oct 2022 09:09:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTD-0001br-Eh for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTC-00047k-23 for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:51 -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-196-SNyo5sWSPtK_vKmkPMiHfQ-1; Thu, 13 Oct 2022 08:37:42 -0400 Received: by mail-ed1-f71.google.com with SMTP id y6-20020a056402358600b0045932521633so1416648edc.17 for ; Thu, 13 Oct 2022 05:37:42 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id lb5-20020a170907784500b0071cbc7487e1sm2968564ejc.69.2022.10.13.05.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664663; 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=PEjqbfSyEAtM0b3ifIeU6in3u3Xiw2yBc5yUjehkgcU=; b=A88UIgHeUaEV6f2OpCixvzcK4yL0L33jdlQ2uubibjC8C8JgFrqFXIcdP8fVT1lTFtJjM0 K3R2CKhsRe4c5g+0rh13lpvugg6p997MWpnxvwTcuKJkPQaw818iiU4odQt1SCSZ2b0lkU RZCgEJYYTvaYLwUMX/1H4ykif6asxqo= X-MC-Unique: SNyo5sWSPtK_vKmkPMiHfQ-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:message-id:reply-to; bh=PEjqbfSyEAtM0b3ifIeU6in3u3Xiw2yBc5yUjehkgcU=; b=uknj29piQJT8566ngWFpWahNyYz/p3Dj3iaPgf08K25mvVO4VpEvFF2ZKzunoLrxL3 ZQ+DkCnpGWYd6G3ZgOnbs/IiR+oZDWjG/WUlI8VhTKzWaEvHhgsrDYh4zMC8ceB+ccOd am73eGkNM/XOsLMMTFdqjz52pghkRAgTssrHLaURDxLpLKqDZPTrfWopPMQQN0RsfMDy vfLcc2OUwIIOFq61lii1Fa0JbbqfktqTMiuTt42TC+j4KLS1rSnS0vtqbguM+N9lrJjR lw5H731lNmBK/njNQOc1A9FluuMEmcK06j3kZNoLRC/HmkfIMKmU/RvkrHb/S4qbcp+7 C+ew== X-Gm-Message-State: ACrzQf2+pCanEVMJmjIefKf/PryqJ84Gihr/itdxlDA+7B+VmRP2PtCR 2zkGO4LkSzUEAl9zPp771hDX5GxdJ8kDKUSsLHiwPKjxmyl+vHTExEHBWmYDvn+x3NKvTEpFd5q KS0CJWOB4b7nIIf4zEhmJAG//Cq6wNyzILkR1DWr9ye+JmCtZhsfVJlFNCvdfejz0wx0= X-Received: by 2002:a17:906:9b8b:b0:78d:8276:ff47 with SMTP id dd11-20020a1709069b8b00b0078d8276ff47mr24950863ejc.430.1665664660727; Thu, 13 Oct 2022 05:37:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5acd8L6GHdtnc/C088ugsN+SoRH5OyCcjP0Msry3Xxpv0FGfG5nv1Q+cXehXMTT6DGo2eU+g== X-Received: by 2002:a17:906:9b8b:b0:78d:8276:ff47 with SMTP id dd11-20020a1709069b8b00b0078d8276ff47mr24950843ejc.430.1665664660411; Thu, 13 Oct 2022 05:37:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 09/24] qcow2: add coroutine_fn annotation for indirect-called functions Date: Thu, 13 Oct 2022 14:36:56 +0200 Message-Id: <20221013123711.620631-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665669173571100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qcow2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index b57f7cc8ee..b7cac50eb3 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -5287,8 +5287,8 @@ static int64_t qcow2_check_vmstate_request(BlockDrive= rState *bs, return pos; } =20 -static int qcow2_save_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, - int64_t pos) +static coroutine_fn int qcow2_save_vmstate(BlockDriverState *bs, + QEMUIOVector *qiov, int64_t pos) { int64_t offset =3D qcow2_check_vmstate_request(bs, qiov, pos); if (offset < 0) { @@ -5299,8 +5299,8 @@ static int qcow2_save_vmstate(BlockDriverState *bs, Q= EMUIOVector *qiov, return bs->drv->bdrv_co_pwritev_part(bs, offset, qiov->size, qiov, 0, = 0); } =20 -static int qcow2_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, - int64_t pos) +static coroutine_fn int qcow2_load_vmstate(BlockDriverState *bs, + QEMUIOVector *qiov, int64_t pos) { int64_t offset =3D qcow2_check_vmstate_request(bs, qiov, pos); if (offset < 0) { --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665666262; cv=none; d=zohomail.com; s=zohoarc; b=RMQD8qd3eE+vVBHYQCfxc/1cALPvMZklyPc1p3TaUfIAY7U3T+abvT6KmL7nMXCy93Ph1aERh0y/u0rcsUVl+kvP8eyJWmP8tWoRtmiFDphKKLA5gVufMlwGNMaEdOk1kwlRXXM1Jz15OKyO1kE1OgHsUAG1zv2gs27PoLWHMVQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665666262; 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=Sjo/iqNBcEVXPD4JF40/GIwlrquR/+RWrpMJEkIzz+Q=; b=Ecl8lAzvKXHmHqp75mEvVQHZeQUJoWfgLWaBvYOZvfyd4kpogBKiT7h9njG9MTDcMbOicHG7PJrcGTrpVY2jNY3ATD9yiKdOis9CVkwE3bH7jyAyiuLiPoCcssHUnluDg/zYFrx++JAtBTYggSTOFuBiRcIpeJl6UTpCT77pxbo= 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 1665666262231729.5993561572553; Thu, 13 Oct 2022 06:04:22 -0700 (PDT) Received: from localhost ([::1]:42778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixsp-0000vJ-Fc for importer@patchew.org; Thu, 13 Oct 2022 09:04:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTE-0001dD-KN for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTC-00047y-2O for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:52 -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-106-9acqcjbjN-2a_zDcFK1H9Q-1; Thu, 13 Oct 2022 08:37:46 -0400 Received: by mail-ed1-f71.google.com with SMTP id s8-20020a056402520800b0045cab560d5eso1430922edd.1 for ; Thu, 13 Oct 2022 05:37:45 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id kx20-20020a170907775400b00781be3e7badsm2955077ejc.53.2022.10.13.05.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664667; 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=Sjo/iqNBcEVXPD4JF40/GIwlrquR/+RWrpMJEkIzz+Q=; b=G3HSYXNTsIYXrFd+c7FPcxTkrcIiLZxR8AaDwjk8xPA8nOnE1zDGtLEE+iiTEMDjiiwzIP 4NAyN+xGn/hlaLMoUOBqRZ57XDS+nuO+x1egSK06wNs0dZ88im6Itoxv+OT5w5vPyrnl/P Ye6mdhEKnMk5W3ebLNMydoSEzWyqsDk= X-MC-Unique: 9acqcjbjN-2a_zDcFK1H9Q-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:message-id:reply-to; bh=Sjo/iqNBcEVXPD4JF40/GIwlrquR/+RWrpMJEkIzz+Q=; b=iNB8HDYeMcwuHBnherNgt4x+ij45BCJmFf6gcVU/q9/msAA3Jhz/QmOMn5ftRHVuFX caaLiK2IfNbSjdvxS5OyrckP6Wp4i7oigIP6fJ5H5bDGGlKxVCjeJ1WBR75saTUO/3UN +tUWpE6WyJxl7F/wFjnfxKM0pnyPnZnreC9X0w5pCB5d3e/IfmucijunuwDXoe6Es70i Sv95nnAAdqlw1zsG0xg/tnvkAqAn7tAeP9RpXSBLmnSgONQFABW4RA2Cq72owzTAVR5c asUwO9mJIzCwTlq1ZJkuYhZPwtzKW8gCc1wtrN1LiomTL5StcKyvTqX8Xq7JbK1qvIuy 3luw== X-Gm-Message-State: ACrzQf2qQIbyeGyaL1Y00uheXGR57uw7cF0EedQ1Zz/yxZvYAwJGz95V iFG13gqlKolRV997Ipk7epDPOd2KswgS/LOcL0n0OHXHClZ3qm4uhKtN0eAKvtIbd7u7PYuBhK8 cMFU2wsp6IZrarD+XpcjGjPU0vC+GR3tiKx38LH/1SVdrAWkmb67JdnKu/Fj09fsA1SY= X-Received: by 2002:a17:906:5a60:b0:78d:b9c2:5bcf with SMTP id my32-20020a1709065a6000b0078db9c25bcfmr14400194ejc.602.1665664663587; Thu, 13 Oct 2022 05:37:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68HuhMophzXqHoKAiQaSCgIExU7vnMJnCUknvvoEcAINH7fMhuQlb/MMxM3+6PN8eUbP5WuA== X-Received: by 2002:a17:906:5a60:b0:78d:b9c2:5bcf with SMTP id my32-20020a1709065a6000b0078db9c25bcfmr14400171ejc.602.1665664663265; Thu, 13 Oct 2022 05:37:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 10/24] blkdebug: add missing coroutine_fn annotation for indirect-called functions Date: Thu, 13 Oct 2022 14:36:57 +0200 Message-Id: <20221013123711.620631-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665666263464100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- block/blkdebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index bbf2948703..b159a9b825 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -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 --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665666134; cv=none; d=zohomail.com; s=zohoarc; b=W4/ezvuzi31js8mKEcfpEE4jYEJsaXSXjLdTkhxnxNoWGf9a7uvLoQBTkI4KxxDWCrjJb0TV7qTVdDK23tCyRVE670qgg+zXb2nIIDnvR1goYhfbT7dQ5G4Bd3hZGr4QLx96Cji/EVvAP8/0//yehbVkc20RRRfHJEuSkDEdAeA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665666134; 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=JLXsQ/hGD407OqvW19603UTrg72JjB7KNc7R1Vr1Zdg=; b=J5K5lOrNQdmIUU50IfzXvt+reMosbMcZb3LkSCrEu/772NBm31wZiVp+IuJCGdCfkmpKMPp9i2jzK9fj2zJ2KV2haoGRp8U4jzmE/EjGWOVp1YHVq+f2SUOqwjH1VMJlPHzWiUZ+r3qERneHTafB51TZMvn03Fm8CdJYJn1UA0Q= 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 1665666134890868.7966091547423; Thu, 13 Oct 2022 06:02:14 -0700 (PDT) Received: from localhost ([::1]:43092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixqn-0007LS-8L for importer@patchew.org; Thu, 13 Oct 2022 09:02:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTE-0001dG-Oj for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:51617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTC-00048C-3O for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:52 -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-135-rGchmcEjNeKxbgsHZu1Clw-1; Thu, 13 Oct 2022 08:37:48 -0400 Received: by mail-ed1-f69.google.com with SMTP id f16-20020a0564021e9000b0045beb029117so1407332edf.12 for ; Thu, 13 Oct 2022 05:37:47 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id d25-20020a50fe99000000b0045c47b2a800sm6756238edt.67.2022.10.13.05.37.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664669; 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=JLXsQ/hGD407OqvW19603UTrg72JjB7KNc7R1Vr1Zdg=; b=XEnLkiwEXgYYg/vzS6H63A2A4qxV/tgPONQwUseRSTqx2QBz69y+Oscwd5I7UCo+cyWyS+ sEN/JJyPP6TiwpNbZTaV1fojaU/61MdaQh91xW2epuRzZfe8LsaGRfFBsa3hb7p2ChoDEI Wk7WJSbQVmzIA3Ch9cii2MrUbWIZNcA= X-MC-Unique: rGchmcEjNeKxbgsHZu1Clw-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:message-id:reply-to; bh=JLXsQ/hGD407OqvW19603UTrg72JjB7KNc7R1Vr1Zdg=; b=aPVzIOr3aW/DycMX9SOW5PEK6F7zGk1uPfRn6yREPA50NA1PRBfkL8cvobbIgYaYeZ ZcLOsA5hbup/Z9DjcTN3axVgzbqPAonKE640f8MbkeHNGAWlwW21A58ikFM0msUGrWMn lHnN1JHK78GTn/6zqblFkr3vOzxBqmdCbbxvy338gxGdQxcnr3wZsCcNzpc5IVRdReY6 /6GXr8j0xPgiA6EJFf52X1J5WxWfSsBUViq+NxBxnoRA05+QmmuQWfD8SM175pE02xyM /0sBrMH9Xc54cCEzXHlb8z4BCkQhMN8XpI7CcH/W6fJtIvkUlzzM3Pz53jmTeg8IP7V5 +Z7w== X-Gm-Message-State: ACrzQf38jnzCb5XdA6x9KmLgh7WNqfU5W16svSQNbIxB7YxZxfnbT7o9 vGcMYXY/hgUQuW/pY086wpjEUYQzHe3+wWDXXIVZwyF4zzJQJn9Rdew7RV2NniWYEjpHnzAODTn /KZc1X+J7uFatVegIo4ZdmqWcFZ1sR4gu6bb+luRk1ZNKbhogZY3U5tOscja4HGyU/lc= X-Received: by 2002:a05:6402:5ca:b0:43b:6e01:482c with SMTP id n10-20020a05640205ca00b0043b6e01482cmr32157144edx.189.1665664666497; Thu, 13 Oct 2022 05:37:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7bKoUnTx+rckbMvd9dKkRQZmMiGmWmJOYjKPEujU2LggP7vYPxkNBNsmSTUDAP2FX8jUxcvQ== X-Received: by 2002:a05:6402:5ca:b0:43b:6e01:482c with SMTP id n10-20020a05640205ca00b0043b6e01482cmr32157125edx.189.1665664666239; Thu, 13 Oct 2022 05:37:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 11/24] qcow: manually add more coroutine_fn annotations Date: Thu, 13 Oct 2022 14:36:58 +0200 Message-Id: <20221013123711.620631-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665666136356100001 Content-Type: text/plain; charset="utf-8" get_cluster_offset() and decompress_cluster() are only called from the read and write paths. The validity of these was double-checked with Alberto Faria's static analyz= er. Signed-off-by: Paolo Bonzini --- block/qcow.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 311aaa8705..7f07c00c0f 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -92,7 +92,7 @@ typedef struct BDRVQcowState { =20 static QemuOptsList qcow_create_opts; =20 -static int decompress_cluster(BlockDriverState *bs, uint64_t cluster_offse= t); +static int coroutine_fn decompress_cluster(BlockDriverState *bs, uint64_t = cluster_offset); =20 static int qcow_probe(const uint8_t *buf, int buf_size, const char *filena= me) { @@ -351,10 +351,10 @@ static int qcow_reopen_prepare(BDRVReopenState *state, * return 0 if not allocated, 1 if *result is assigned, and negative * errno on failure. */ -static int get_cluster_offset(BlockDriverState *bs, - uint64_t offset, int allocate, - int compressed_size, - int n_start, int n_end, uint64_t *result) +static int coroutine_fn get_cluster_offset(BlockDriverState *bs, + uint64_t offset, int allocate, + int compressed_size, + int n_start, int n_end, uint64_= t *result) { BDRVQcowState *s =3D bs->opaque; int min_index, i, j, l1_index, l2_index, ret; @@ -585,7 +585,7 @@ static int decompress_buffer(uint8_t *out_buf, int out_= buf_size, return 0; } =20 -static int decompress_cluster(BlockDriverState *bs, uint64_t cluster_offse= t) +static int coroutine_fn decompress_cluster(BlockDriverState *bs, uint64_t = cluster_offset) { BDRVQcowState *s =3D bs->opaque; int ret, csize; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665669543; cv=none; d=zohomail.com; s=zohoarc; b=QMlw0FGjmYBovwJ4eS9TTULkPsl+DIkX4dS/0povaRQMJb0dTD5Z7vqCZQVH9jrcDAP9QKR6sjlQ20qROL7da4v0hpnvPLtfr4fjiOEJWNTFXOWoMkpK1LF9utAptXjRe3304m28cH8vLyRg2VyRyhrPHqxjtL+pOISK12Ij6VA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665669543; 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=3atP9m9y4dWbFKHTecCO4OZPzDMHdkM+aumNDlBfb94=; b=hn6LVvzhdx4VQ5L5CxfEsSwOgfiYVaMT14Qx58lvK09YQnGZmu2nSwkqRKx+w9+K1rGHg1VXz2Oe7YC70OAojXrf9xyYMTHMzvXWCh7iskSTi+5OPkqNZC4QxSBFjfP+pLMh3qhFxg50zsoH8em/9ZO93ZIdCpXdIvzKQGGfkrM= 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 166566954387125.195451304153835; Thu, 13 Oct 2022 06:59:03 -0700 (PDT) Received: from localhost ([::1]:36856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixyP-0007HR-OW for importer@patchew.org; Thu, 13 Oct 2022 09:10:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTH-0001ez-QW for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTF-00049K-11 for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:55 -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-616-eX0rTaRGMiiv3JWh_FM45A-1; Thu, 13 Oct 2022 08:37:51 -0400 Received: by mail-ej1-f72.google.com with SMTP id dt13-20020a170907728d00b007825956d979so833741ejc.15 for ; Thu, 13 Oct 2022 05:37:51 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id q17-20020a17090676d100b0074136cac2e7sm2958207ejn.81.2022.10.13.05.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664672; 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=3atP9m9y4dWbFKHTecCO4OZPzDMHdkM+aumNDlBfb94=; b=Xhg5WLCHEIo7OUlwX4H7XeZ1qr4nGi2vjXdamiLMo7zpfPZ0PlwctJBKPqKZRpjPWbiUNa cGuk7hKtnb6TaigSRF3iEHFuBgCcP5lqDxWBlHcEPcm+UWm2ZkYnk8E9ISvhPWTNqFDXPW 57GmZfx+f9OjxZVm4z5zV+b2q4vlwaY= X-MC-Unique: eX0rTaRGMiiv3JWh_FM45A-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:message-id:reply-to; bh=3atP9m9y4dWbFKHTecCO4OZPzDMHdkM+aumNDlBfb94=; b=J5uYgqHs5/GMaVrnrtDZWE+B9j7+1jg0qBPCY9RHVVilWafHejNdHAU36jT7bUDzlj s2Z3CY3qkUrZdf+4YyVLmoqHnSN2zlseF44F5APnppnNNJvk/28HM7sLIGcREBwamn6H XTE5ro2d2qhISeBQXUjG065t21ksVA8PcrfBW7gCgx1h35LeHDK0c0QpCT4NSErivJhP ZhFFW+2+TufUcMDTEscDV6qJlzNlpMnfeaVgOcYovoglUL37I5H+QtBfMzO8gX21ltSO gnin43CHCm9OmV0OxdTFdS5G24vSjd15MIa87UXNnLWnPDN+btlPKvDF6e6+K1IoueB3 BWow== X-Gm-Message-State: ACrzQf31ReEZ1DJUq7WNdXxPiTDvVZwGSOlceAZvuzSWXbPu0U6ctm6Y fyaXF/imeuNWDQCUGE1N7BxqyMCv8AXsxUMfSqhIwTmME9r78zX63fBQ3CgzdiHji5RB5f/4HgJ ul6PnKjgwXO5P2Nc+P+cpeT0DoTrBKV+PVHU9J4ljse8uUNX7NoKw2SoxcHUV6q2Zv6w= X-Received: by 2002:a05:6402:84d:b0:454:f41d:6ccf with SMTP id b13-20020a056402084d00b00454f41d6ccfmr31054022edz.129.1665664669425; Thu, 13 Oct 2022 05:37:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6PdbKDI81TsZgDzKTM1NEvJSo0FNqWLEJQi8AfEB9WFVqiIJLs+YHBrTGRsGFyaxRnJOUmHQ== X-Received: by 2002:a05:6402:84d:b0:454:f41d:6ccf with SMTP id b13-20020a056402084d00b00454f41d6ccfmr31054000edz.129.1665664669139; Thu, 13 Oct 2022 05:37:49 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 12/24] qcow2: manually add more coroutine_fn annotations Date: Thu, 13 Oct 2022 14:36:59 +0200 Message-Id: <20221013123711.620631-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665669544659100003 Content-Type: text/plain; charset="utf-8" The validity of these was double-checked with Alberto Faria's static analyz= er. Signed-off-by: Paolo Bonzini --- block/qcow2-bitmap.c | 4 ++-- block/qcow2-cluster.c | 18 +++++++++--------- block/qcow2-refcount.c | 8 ++++---- block/qcow2.h | 18 +++++++++--------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 7197754843..1ff127647a 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -955,8 +955,8 @@ static void set_readonly_helper(gpointer bitmap, gpoint= er value) * If header_updated is not NULL then it is set appropriately regardless of * the return value. */ -bool qcow2_load_dirty_bitmaps(BlockDriverState *bs, bool *header_updated, - Error **errp) +bool coroutine_fn qcow2_load_dirty_bitmaps(BlockDriverState *bs, bool *hea= der_updated, + Error **errp) { BDRVQcow2State *s =3D bs->opaque; Qcow2BitmapList *bm_list; diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 0f293950a1..523c37215a 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -31,7 +31,7 @@ #include "qemu/memalign.h" #include "trace.h" =20 -int qcow2_shrink_l1_table(BlockDriverState *bs, uint64_t exact_size) +int coroutine_fn qcow2_shrink_l1_table(BlockDriverState *bs, uint64_t exac= t_size) { BDRVQcow2State *s =3D bs->opaque; int new_l1_size, i, ret; @@ -823,10 +823,10 @@ static int get_cluster_table(BlockDriverState *bs, ui= nt64_t offset, * * Return 0 on success and -errno in error cases */ -int qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs, - uint64_t offset, - int compressed_size, - uint64_t *host_offset) +int coroutine_fn qcow2_alloc_compressed_cluster_offset(BlockDriverState *b= s, + uint64_t offset, + int compressed_size, + uint64_t *host_offs= et) { BDRVQcow2State *s =3D bs->opaque; int l2_index, ret; @@ -1488,7 +1488,7 @@ static int coroutine_fn handle_dependencies(BlockDriv= erState *bs, * * -errno: in error cases */ -static int handle_copied(BlockDriverState *bs, uint64_t guest_offset, +static int coroutine_fn handle_copied(BlockDriverState *bs, uint64_t guest= _offset, uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m) { BDRVQcow2State *s =3D bs->opaque; @@ -1653,7 +1653,7 @@ static int do_alloc_cluster_offset(BlockDriverState *= bs, uint64_t guest_offset, * * -errno: in error cases */ -static int handle_alloc(BlockDriverState *bs, uint64_t guest_offset, +static int coroutine_fn handle_alloc(BlockDriverState *bs, uint64_t guest_= offset, uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m) { BDRVQcow2State *s =3D bs->opaque; diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 1fbb07ca77..38861ed7c8 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -97,7 +97,7 @@ static void update_max_refcount_table_index(BDRVQcow2Stat= e *s) s->max_refcount_table_index =3D i; } =20 -int qcow2_refcount_init(BlockDriverState *bs) +int coroutine_fn qcow2_refcount_init(BlockDriverState *bs) { BDRVQcow2State *s =3D bs->opaque; unsigned int refcount_table_size2, i; @@ -3559,8 +3559,8 @@ static int64_t get_refblock_offset(BlockDriverState *= bs, uint64_t offset) return covering_refblock_offset; } =20 -static int qcow2_discard_refcount_block(BlockDriverState *bs, - uint64_t discard_block_offs) +static int coroutine_fn qcow2_discard_refcount_block(BlockDriverState *bs, + uint64_t discard_bloc= k_offs) { BDRVQcow2State *s =3D bs->opaque; int64_t refblock_offs; @@ -3616,7 +3616,7 @@ static int qcow2_discard_refcount_block(BlockDriverSt= ate *bs, return 0; } =20 -int qcow2_shrink_reftable(BlockDriverState *bs) +int coroutine_fn qcow2_shrink_reftable(BlockDriverState *bs) { BDRVQcow2State *s =3D bs->opaque; uint64_t *reftable_tmp =3D diff --git a/block/qcow2.h b/block/qcow2.h index ad6e7f65bd..32612e53e5 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -846,7 +846,7 @@ int qcow2_validate_table(BlockDriverState *bs, uint64_t= offset, Error **errp); =20 /* qcow2-refcount.c functions */ -int qcow2_refcount_init(BlockDriverState *bs); +int coroutine_fn qcow2_refcount_init(BlockDriverState *bs); void qcow2_refcount_close(BlockDriverState *bs); =20 int qcow2_get_refcount(BlockDriverState *bs, int64_t cluster_index, @@ -893,14 +893,14 @@ int qcow2_inc_refcounts_imrt(BlockDriverState *bs, Bd= rvCheckResult *res, int qcow2_change_refcount_order(BlockDriverState *bs, int refcount_order, BlockDriverAmendStatusCB *status_cb, void *cb_opaque, Error **errp); -int qcow2_shrink_reftable(BlockDriverState *bs); +int coroutine_fn qcow2_shrink_reftable(BlockDriverState *bs); int64_t qcow2_get_last_cluster(BlockDriverState *bs, int64_t size); 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, bool exact_size); -int qcow2_shrink_l1_table(BlockDriverState *bs, uint64_t max_size); +int coroutine_fn qcow2_shrink_l1_table(BlockDriverState *bs, uint64_t max_= size); int qcow2_write_l1_entry(BlockDriverState *bs, int l1_index); int qcow2_encrypt_sectors(BDRVQcow2State *s, int64_t sector_num, uint8_t *buf, int nb_sectors, bool enc, Error **= errp); @@ -911,10 +911,10 @@ int qcow2_get_host_offset(BlockDriverState *bs, uint6= 4_t offset, int coroutine_fn qcow2_alloc_host_offset(BlockDriverState *bs, uint64_t of= fset, unsigned int *bytes, uint64_t *host_offset, QCowL2Meta= **m); -int qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs, - uint64_t offset, - int compressed_size, - uint64_t *host_offset); +int coroutine_fn qcow2_alloc_compressed_cluster_offset(BlockDriverState *b= s, + uint64_t offset, + int compressed_size, + uint64_t *host_offs= et); void qcow2_parse_compressed_l2_entry(BlockDriverState *bs, uint64_t l2_ent= ry, uint64_t *coffset, int *csize); =20 @@ -982,8 +982,8 @@ void qcow2_cache_discard(Qcow2Cache *c, void *table); int qcow2_check_bitmaps_refcounts(BlockDriverState *bs, BdrvCheckResult *r= es, void **refcount_table, int64_t *refcount_table_size); -bool qcow2_load_dirty_bitmaps(BlockDriverState *bs, bool *header_updated, - Error **errp); +bool coroutine_fn qcow2_load_dirty_bitmaps(BlockDriverState *bs, bool *hea= der_updated, + Error **errp); bool qcow2_get_bitmap_info_list(BlockDriverState *bs, Qcow2BitmapInfoList **info_list, Error **e= rrp); int qcow2_reopen_bitmaps_rw(BlockDriverState *bs, Error **errp); --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665665862; cv=none; d=zohomail.com; s=zohoarc; b=Gkr7uhGOZMGUCPuO+CXqvkpamh7DRksn5cX2M7O3MvTcGKuqHi41+NhAKOvbB9qF+6ismjpuDUT/bU9Np2R2wW9Ec41lUjiHBBnYufxiqgmus4WqJqxOP2z39v64wjowP947/o3NBUND5jRjRA5NFlUHlF3O+fDWQJdp2qXPWpY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665665862; 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=6p9wW5S3qope20ARiwwB1/wCgZkeo4khoHnfaJkJFMM=; b=RjQwjVE6mR7vtVuw/eNgWk428iSg5YAxRl6YqV29xUbz6wsiX97O0i0CK5I/e9fZ8GMuvJ+dF9WGfEnTC7vGbskdC+bGsWGSnRMXOPMqHadF2EyCuhhuQyE/mRKoQddvf2k39w8V16AGTgVAAAD+3vFemTUE8Hlkd8TufiKH8nI= 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 1665665862604898.0464040871757; Thu, 13 Oct 2022 05:57:42 -0700 (PDT) Received: from localhost ([::1]:49778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixmN-0002zm-PL for importer@patchew.org; Thu, 13 Oct 2022 08:57:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTK-0001f5-6f for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTI-00049n-JV for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37: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-632-rK8htMnXOrSy_ofwZZzIxQ-1; Thu, 13 Oct 2022 08:37:54 -0400 Received: by mail-ed1-f72.google.com with SMTP id f16-20020a0564021e9000b0045beb029117so1407513edf.12 for ; Thu, 13 Oct 2022 05:37:53 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id j9-20020a17090623e900b007803083a36asm1087196ejg.115.2022.10.13.05.37.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664675; 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=6p9wW5S3qope20ARiwwB1/wCgZkeo4khoHnfaJkJFMM=; b=B65xuQJGXGsGgIi4CdZAAiec2LuhLRnVgn23QgzRyQPineO+2oUJnQkd3HjZKM8NANoytC Z4v7pPH0urLREBSMIkPvaDfQ8brpWL1mN4W87DzPuBD71olIntm/yJW1hUHRE+e2HOdFWM chwoo8RRFexxTYILP3jv/bliauskrss= X-MC-Unique: rK8htMnXOrSy_ofwZZzIxQ-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:message-id:reply-to; bh=6p9wW5S3qope20ARiwwB1/wCgZkeo4khoHnfaJkJFMM=; b=FEj97Mn432fv+O77pLm/kxTkUvMFU+T8CPUZYE4h+KxKDHRhm41RJDgQUN6eUYCyLR EmCV4SDVmeTWiVlwqb4XUgCgE5/icm8O2nMkKPVkEgIqOVteMk7X2udzX5TQ0KgeOuRL dDocTpYt30yc7ISHgoj53x8W3c3NTvjjZBo9gzOFEtVNNGVHbmpVe+ZP26X8biINt2AL /n3684oktmXqOZDGZWHZSUTS4zMuZ76c+EyDZAvLB272czSdPrO/Nctelxka+3IFOwry cSsHqw1bVL1uBy0kqpYpPjw62tgqp3VkOhkccox1ZKyCjwij7s1YQHvuX8hyxovE2F+u v1Cg== X-Gm-Message-State: ACrzQf3F1u0uo2NrlbIaZCLF7BJdn3c7bKcD2xk7SUbmY8EQLKTdndZa LD6xXCRsC7DNEBreNbKf/87D8wv6p+LNDi0S+TDdeRp14ISrebJE86G6F9F4MAkhAeeQX5dp+X2 iH6ScJPhXU8G1XwF8jv5yhlUycFZJyoXCKYXcK2BzR//L2sgw9hPXz0wdyuQZ14Ldc30= X-Received: by 2002:a17:906:5a48:b0:78e:18a1:32ba with SMTP id my8-20020a1709065a4800b0078e18a132bamr1221829ejc.346.1665664672462; Thu, 13 Oct 2022 05:37:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4AJiqbazgWSeNk/AiJIZKt0/kB06xsA39nfJmM+K6NhW3c9SRCuJEXKLY07hGomz7/5Yt7RQ== X-Received: by 2002:a17:906:5a48:b0:78e:18a1:32ba with SMTP id my8-20020a1709065a4800b0078e18a132bamr1221808ejc.346.1665664672121; Thu, 13 Oct 2022 05:37:52 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 13/24] vmdk: manually add more coroutine_fn annotations Date: Thu, 13 Oct 2022 14:37:00 +0200 Message-Id: <20221013123711.620631-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665665865211100001 Content-Type: text/plain; charset="utf-8" The validity of these was double-checked with Alberto Faria's static analyz= er. Signed-off-by: Paolo Bonzini --- block/vmdk.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index f7d8856dfb..c720376aa5 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1404,13 +1404,13 @@ static void vmdk_refresh_limits(BlockDriverState *b= s, Error **errp) * [@skip_start_sector, @skip_end_sector) is not copied or written, and le= ave * it for call to write user data in the request. */ -static int get_whole_cluster(BlockDriverState *bs, - VmdkExtent *extent, - uint64_t cluster_offset, - uint64_t offset, - uint64_t skip_start_bytes, - uint64_t skip_end_bytes, - bool zeroed) +static int coroutine_fn get_whole_cluster(BlockDriverState *bs, + VmdkExtent *extent, + uint64_t cluster_offset, + uint64_t offset, + uint64_t skip_start_bytes, + uint64_t skip_end_bytes, + bool zeroed) { int ret =3D VMDK_OK; int64_t cluster_bytes; @@ -1485,8 +1485,8 @@ exit: return ret; } =20 -static int vmdk_L2update(VmdkExtent *extent, VmdkMetaData *m_data, - uint32_t offset) +static int coroutine_fn vmdk_L2update(VmdkExtent *extent, VmdkMetaData *m_= data, + uint32_t offset) { offset =3D cpu_to_le32(offset); /* update L2 table */ @@ -1537,14 +1537,14 @@ static int vmdk_L2update(VmdkExtent *extent, VmdkMe= taData *m_data, * VMDK_UNALLOC if cluster is not mapped and @allocate is false. * VMDK_ERROR if failed. */ -static int get_cluster_offset(BlockDriverState *bs, - VmdkExtent *extent, - VmdkMetaData *m_data, - uint64_t offset, - bool allocate, - uint64_t *cluster_offset, - uint64_t skip_start_bytes, - uint64_t skip_end_bytes) +static int coroutine_fn get_cluster_offset(BlockDriverState *bs, + VmdkExtent *extent, + VmdkMetaData *m_data, + uint64_t offset, + bool allocate, + uint64_t *cluster_offset, + uint64_t skip_start_bytes, + uint64_t skip_end_bytes) { unsigned int l1_index, l2_offset, l2_index; int min_index, i, j; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665667629; cv=none; d=zohomail.com; s=zohoarc; b=KLdCtPXIyahkZHVPzIhv9kYbHt8V+kEdyxVLvdk40FdxRrA8UiWzNWOP4nQAlFyq+tYKAt0l3N5qKyZXoUVwBQJ9nma1wT4h0OgdL2Ius3IWhnmPDBE/L5eGa4BVuhfKVIISE8pF7ZXdFSO0V0Uot1Uj7jzzRsIzC50hjxCB8xQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665667629; 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=rCIh+kWFUgLaHVSIufoAJ6Cycswz/EUJ5NdLNcYpSp4=; b=iNBgffU3HVvxc2Zj9gllq+bC+LBfYYvtaYJyjjo6UgEd9YNG38na4VgpJ5ALS0c9yGAewtWCH7DmSZpmvI6FhL13sjpIxde9m6TRtoygLJHQ7kxGdMHDaVLK+2zl10fKbfjUhdz2D1zm+MyiwSMLW7mXp9qffeRTbCuobLBGl3k= 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 1665667629915131.55701056366115; Thu, 13 Oct 2022 06:27:09 -0700 (PDT) Received: from localhost ([::1]:42218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiyEu-0000Fl-JO for importer@patchew.org; Thu, 13 Oct 2022 09:27:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTL-0001fA-RE for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:46892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTK-0004AH-By for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:37:59 -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-620-5cIcrgw4NXemj5irdNOxcQ-1; Thu, 13 Oct 2022 08:37:56 -0400 Received: by mail-ed1-f69.google.com with SMTP id j20-20020a05640211d400b0045bd72f05d6so1424793edw.11 for ; Thu, 13 Oct 2022 05:37:56 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id t22-20020a170906065600b00780982d77d1sm2916798ejb.154.2022.10.13.05.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664677; 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=rCIh+kWFUgLaHVSIufoAJ6Cycswz/EUJ5NdLNcYpSp4=; b=dkslxj21F4lQOfl49c0j9wzii5evxZjfh/scmmrEKjzUjWU15J03RwDNjvR5GnYBAER/UD qHlVGyOX6mH2pn+TGq07Zy8cQ3r9YgQEAieSuHGjmWPP4lIJoVOoheTNQ/25HJVAukYLqk jLWNzYRNWc3upLXiKUWM2iqUvWIXtHw= X-MC-Unique: 5cIcrgw4NXemj5irdNOxcQ-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:message-id:reply-to; bh=rCIh+kWFUgLaHVSIufoAJ6Cycswz/EUJ5NdLNcYpSp4=; b=uPRm0P75/TZVGp00dtov2KQXAdwX3ieTdSFPYzgmX45zq4QpdPiGycc2/sbD/Wp9bG d4erTmDXCXxoZbuoitJuxCEC4tp1pxWSZYO1cp8poGr3f6M/pltjB3pL/Oqi5GmshC1t H8mgMmRjI9CGGVYtQJZFqKNwFjazGh/Ss4ATNWigxTuSyKXmPRRjFihN9rLezIAb0aN+ 4azcIkZBEci1t9nu7TeXybGBxTwqE32TdI/ZPa5Mn9iyTW0EXXhvNyEA3CWhWaDFvaEj LCTvIrBreTwBSsQjv2ExHmP4/mXctX0UML9SReshg9flnqtP5PmKaQosQOry2Ea9nDWp SIuQ== X-Gm-Message-State: ACrzQf3H+Bclb3y70ibqgSrFBFcOp4bThzCJ1y131sxw7WV9v8bkGkbL MgLRXmXE94BEV9mVokOMZud0Fj/nXKQBNmIkcOXoOgAwiDyYGVlg4degJ0Jt0frQfNiHWXYXcnO CBNyR+3ZQ80mfHs0ODL99B2Godtvd5Gkad77axYcHjMxe/zhW01Ikl4nY9ClZWqS9IV8= X-Received: by 2002:a17:906:6a8d:b0:741:6a3b:536e with SMTP id p13-20020a1709066a8d00b007416a3b536emr26960462ejr.11.1665664675445; Thu, 13 Oct 2022 05:37:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Z1LYLG9t4aDYaSu27RGXgUZ8uyc8ubpGqxrAirG27WaKjxN/wSw8KJfwbDZWQ5wRKyVTrrg== X-Received: by 2002:a17:906:6a8d:b0:741:6a3b:536e with SMTP id p13-20020a1709066a8d00b007416a3b536emr26960447ejr.11.1665664675134; Thu, 13 Oct 2022 05:37:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 14/24] commit: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:01 +0200 Message-Id: <20221013123711.620631-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665667630980100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/commit.c b/block/commit.c index 38571510cb..945945de05 100644 --- a/block/commit.c +++ b/block/commit.c @@ -135,7 +135,7 @@ static int coroutine_fn commit_run(Job *job, Error **er= rp) } =20 if (base_len < len) { - ret =3D blk_truncate(s->base, len, false, PREALLOC_MODE_OFF, 0, NU= LL); + ret =3D blk_co_truncate(s->base, len, false, PREALLOC_MODE_OFF, 0,= NULL); if (ret) { return ret; } --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665669092; cv=none; d=zohomail.com; s=zohoarc; b=JbwYl746rNDzsSSCE204QLxhMp+1TaI05MSSLmdYFtGGbHzK1G+FhCvFBQh+zV3Sy1ax0+6O+rkFFEbySnxwfEPkqXfJxNkBsxLn2saXrkmvt4MgZRtMxVmr9fEz6xQbQPz6m+1Yl3+CEsqyhzfVrVW276CNP9F8FAnjQz8ouNA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665669092; 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=4ZgPHv5HXmmvEvP18d2RTE8qvepuBhdcIwk0L2mSSJY=; b=ciIx1fwRzkS3EVvtcICLQVjpU6XCG47mk0s3mUe7VyCXhbXycDPtNU/1uLcYjif1S0OmDsmXics3XaGtw6BFt+fl/ccx/dYBIxjLcotDQ9FTCXLprEIeBBFZdWYP99JlLBKFGo/Mz8+PQb8it7X7TaELS74g/jcZDcxAZUhnph4= 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 1665669092345846.4741265623446; Thu, 13 Oct 2022 06:51:32 -0700 (PDT) Received: from localhost ([::1]:34512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiy2v-0005b4-4u for importer@patchew.org; Thu, 13 Oct 2022 09:14:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTP-0001fC-2d for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:42153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTN-0004DR-G6 for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:02 -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-635-yZigkx0ONGiVBKbPPZzvpQ-1; Thu, 13 Oct 2022 08:37:59 -0400 Received: by mail-ej1-f70.google.com with SMTP id hq13-20020a1709073f0d00b0078dce6a32fcso825400ejc.13 for ; Thu, 13 Oct 2022 05:37:59 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id i24-20020a0564020f1800b0045cba869e84sm3025480eda.26.2022.10.13.05.37.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664680; 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=4ZgPHv5HXmmvEvP18d2RTE8qvepuBhdcIwk0L2mSSJY=; b=HEEM4B+/w7lYrU6RWo02fEkKBE49W+hF/W9IUpGwpbi5yI9fww1acKzoXdrVjdkvoqcxDS 2Y/quvkV9k4mIwRINhym407x5vWi8ktEpmBeh4VjNsxFT2AmBRhQr0BG3DQ1UC2aLjkGH8 4mw+qZEJOaVAyPgasDIPFqCqcJ+sM5M= X-MC-Unique: yZigkx0ONGiVBKbPPZzvpQ-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:message-id:reply-to; bh=4ZgPHv5HXmmvEvP18d2RTE8qvepuBhdcIwk0L2mSSJY=; b=gx1dLTvG3ioSa339rKQkeOMd0QqICPMidKm2DLdgln61pUQ+w4a3VTidhOvjAJIW6z G8UhKAKEjx/YF1s2qkW3tV/SNqLCR4ZcqWaYVPiIwl3IDAJTo9jCqp77NWNhkzq5BMr6 zwh6SqlJHYC6OIFLmloTfI8PnMrNFn7b5wNfQQ3tTVGx7ASIZGjssJqEUoo/rSly+T1u wHpoOXiB0p2f3kAvNKg6tIyIwoBsfReV7tYDF1bSBgtE6VIVnkdVcA9ZpmOYF90FEOXD X9RFDIIEzc+o2yrp3eXiOij4pwhH0vg/uXqeSstcxDhIje4AE/BKjjJ4I20dtJTxoLHi +QYg== X-Gm-Message-State: ACrzQf1Hsg5vDe302Hy26Xao6P9k9qlL3yIiyOmUL2Oacgw0UfuGnXkY 8tWAKm/YiRlJXBoSEXSkGgJWZrri2Giv0Oy+elEPasMzdtblq+kdEQX2Nl4Op1MuPWX4H5ZGQxR uuY1hZIGgCFuIswS0g/6Ata8mH5XSGZQb08qqUycIl6dpZfMWOXECzy7JtEf45TmJKuw= X-Received: by 2002:a05:6402:1205:b0:458:c1b2:e428 with SMTP id c5-20020a056402120500b00458c1b2e428mr31401489edw.94.1665664677862; Thu, 13 Oct 2022 05:37:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7GC0+PBDTPjrIJsIVsWDAz9MP8SZRwng7uZk/zC+qzpfKmpWkf65oRp1pofoUh4ajQYDjb2A== X-Received: by 2002:a05:6402:1205:b0:458:c1b2:e428 with SMTP id c5-20020a056402120500b00458c1b2e428mr31401464edw.94.1665664677627; Thu, 13 Oct 2022 05:37:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 15/24] block: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:02 +0200 Message-Id: <20221013123711.620631-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665669093291100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block.c | 2 +- block/io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 1fbf6b9e69..e44801fd28 100644 --- a/block.c +++ b/block.c @@ -643,7 +643,7 @@ create_file_fallback_zero_first_sector(BlockBackend *bl= k, =20 bytes_to_clear =3D MIN(current_size, BDRV_SECTOR_SIZE); if (bytes_to_clear) { - ret =3D blk_pwrite_zeroes(blk, 0, bytes_to_clear, BDRV_REQ_MAY_UNM= AP); + ret =3D blk_co_pwrite_zeroes(blk, 0, bytes_to_clear, BDRV_REQ_MAY_= UNMAP); if (ret < 0) { error_setg_errno(errp, -ret, "Failed to clear the new image's first sector= "); diff --git a/block/io.c b/block/io.c index 236b12da2a..5518a9d1e6 100644 --- a/block/io.c +++ b/block/io.c @@ -2729,8 +2729,8 @@ int coroutine_fn bdrv_co_is_zero_fast(BlockDriverStat= e *bs, int64_t offset, return 1; } =20 - ret =3D bdrv_common_block_status_above(bs, NULL, false, false, offset, - bytes, &pnum, NULL, NULL, NULL); + ret =3D bdrv_co_common_block_status_above(bs, NULL, false, false, offs= et, + bytes, &pnum, NULL, NULL, NULL= ); =20 if (ret < 0) { return ret; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665669105; cv=none; d=zohomail.com; s=zohoarc; b=erG9u5Fz4ECfiyE5SioSshLOBfXLYkNTUAx1ZqJl1o7nBDucxsxN7lxmlWGTHFdZLTZcSlt+2UqbvEBwFm5XPUUmTc/HMiMIukeeVGUxNZJ7jbWl0AhgTxTAxzB0h3e8BUlNlzgv6ahcotbBCmiYthkHbaaKNpQrNH1tqSca3g4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665669105; 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=CVDmc3XDvK/thJgkpU95iFUXhIKVU4Gu6IGZq73ljw0=; b=k5Z7Dq5uRCA/Do7UcliIATWoE+dEIhzjMyUEaVRigq3zoer3vbC35GTYp4XxdvXwOSqs/8g+tGIP6psHB28zTQbCSZ5ZBe0P+Y/fnuIZtYCTBd5LZ+sSTfgHxeOW9Jfw6inqFsE/2pc+OGuYZ0nyxQHCrHGGoHGVCER9KbiYzZ8= 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 1665669105149944.6689533553131; Thu, 13 Oct 2022 06:51:45 -0700 (PDT) Received: from localhost ([::1]:55310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixy0-0006CW-QU for importer@patchew.org; Thu, 13 Oct 2022 09:09:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTr-0001ia-TL for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:44933) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTR-0004GV-0k for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:21 -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-383-e-jTsCHTP8-8RLmoWR2NmA-1; Thu, 13 Oct 2022 08:38:01 -0400 Received: by mail-ed1-f69.google.com with SMTP id s8-20020a056402520800b0045cab560d5eso1431525edd.1 for ; Thu, 13 Oct 2022 05:38:01 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id cn22-20020a0564020cb600b00459012e5145sm13075521edb.70.2022.10.13.05.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:37:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664682; 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=CVDmc3XDvK/thJgkpU95iFUXhIKVU4Gu6IGZq73ljw0=; b=NPeBuef+RTB3gnt6RFcKhFdr4Z/ArPDHalJ/Q7HFfS/f4wrTrHNNdOsnnVRGZf/6jRc4r1 xyTYKdhJqHqYRIcQnQjdeplm9o/dMztnjsQBBhZs1U33UYh3Rc0MuY9VdljVBhyyJpLGKS OKxl7bP+4lj47Le9zibU0KGsDhVD6t8= X-MC-Unique: e-jTsCHTP8-8RLmoWR2NmA-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:message-id:reply-to; bh=CVDmc3XDvK/thJgkpU95iFUXhIKVU4Gu6IGZq73ljw0=; b=IRnOLyOsuciw+GxRLEqfFdNQy/lpTy6ZD1PUnDrPnLlcWYgwjYwjNXN4tF0IjUojb5 zsI8QmoTcjrTHt8mWV6lapVix7kUn7Mw0j5aKEiDZtYjeZSKS8L0lsXdSYa6e8EEvXEt hPVM3Txa/EuCeR5IePm0tfxf8bxSHH/elFswBEx6w1CTenBFrbU6wBKySTXqz1I91b57 EQ3MzODGCck84XbDoCCWqG7kCLufaAcW61SfHnJglV+8eloA6xI8WYkCDqTnGk1FwUde 1OVvt4ku59NHckTrLhPageL/jPtZ+MFvV6x/BeuQ72GHkgDwKFKx/Ry4yIcMb69SvWNk PRzw== X-Gm-Message-State: ACrzQf1er6LDhE4rO521PUPdq7JBr6wHmJiOJqLA2ZIFvMKUoLW1Q5BP vDMVKzanaBMZgIlJ9hhj9a+J3T5mWtmfbzCVGZ4FaIazkwrL04T6zrZLy5e5rXZipb2ewECBFh3 a2ow4y6fFQ+qP4RII9TSQ2UPlQ2TMbca+6EJDmBe3JT1PzvfGJO4uCkZ6PkpCU6TDeVY= X-Received: by 2002:a05:6402:4411:b0:437:b723:72 with SMTP id y17-20020a056402441100b00437b7230072mr32125990eda.38.1665664680389; Thu, 13 Oct 2022 05:38:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5notXaPdokFml5smlFsvujYAPXx8QCKa2p72jSlf6MfVaqnqOInVp3cqp2E7UUS56Oq0mFUg== X-Received: by 2002:a05:6402:4411:b0:437:b723:72 with SMTP id y17-20020a056402441100b00437b7230072mr32125976eda.38.1665664680144; Thu, 13 Oct 2022 05:38:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 16/24] mirror: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:03 +0200 Message-Id: <20221013123711.620631-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665669109685100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 80c0109d39..95677c8969 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -922,8 +922,8 @@ static int coroutine_fn mirror_run(Job *job, Error **er= rp) * active layer. */ if (s->base =3D=3D blk_bs(s->target)) { if (s->bdev_length > target_length) { - ret =3D blk_truncate(s->target, s->bdev_length, false, - PREALLOC_MODE_OFF, 0, NULL); + ret =3D blk_co_truncate(s->target, s->bdev_length, false, + PREALLOC_MODE_OFF, 0, NULL); if (ret < 0) { goto immediate_exit; } --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665668914; cv=none; d=zohomail.com; s=zohoarc; b=AvALVy7YIK4YGnewk8mik/IMma6hXOubJhovsoEClti+q3QzcEaQUSOyqAwlw6p6pIpYuqOYlz/ct/a4DqkBGgmSaMhI+Rqn3UMeCLMbpt2eDYLBN5Z2xahzwJFLVq81LPXPX3+Gdz6Q+O5Lbc5tHiWtdTH7foIqtuYL5PhsLmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665668914; 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=WJh2BL3IR22mbnk+Z3jlS1vS+H+ZczONctJzx8EUobw=; b=Z8o8jxZT4y2roXjk02YPV79YheqOoIft6MszMkioqFeL6+DZbWuBwTNioZEwQs75JjtuqK/tEzOT45e8t1Lf3rr5HERDC8I6bELNBYgYrkl5IcLG6noZSfaYgf4skI7jshipdbMAKUn6KrU0LbR8tydzfh3V424wvy7SUFOwmYg= 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 1665668914863946.2515428847461; Thu, 13 Oct 2022 06:48:34 -0700 (PDT) Received: from localhost ([::1]:39628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixyu-0007XS-FH for importer@patchew.org; Thu, 13 Oct 2022 09:10:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTx-0001ie-Gf for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTf-0004Ge-4G for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:22 -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-222-O3ZTidLUOSaZ5JqvhsqE2w-1; Thu, 13 Oct 2022 08:38:05 -0400 Received: by mail-ed1-f72.google.com with SMTP id b8-20020a056402278800b0045c948cc65fso1414486ede.9 for ; Thu, 13 Oct 2022 05:38:04 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id d41-20020a056402402900b0045bef7cf489sm9587178eda.89.2022.10.13.05.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664686; 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=WJh2BL3IR22mbnk+Z3jlS1vS+H+ZczONctJzx8EUobw=; b=S2SWSzOKBFt2H7X17tRlJooqt6F6by+O++EpLuCfi3sNzaOytPwcF4WK/nW+nD+ej2/vHt 7jFUlprVi56KBK5lUqqw4mRgc0iRTeStHDQkiIAe+ydFG1ZBtlFRa2ME7fGqmMoqkU8MVI bcycXQlcYs42+QBY19iPgRO9DJf3SGA= X-MC-Unique: O3ZTidLUOSaZ5JqvhsqE2w-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:message-id:reply-to; bh=WJh2BL3IR22mbnk+Z3jlS1vS+H+ZczONctJzx8EUobw=; b=ysOEG8PqwDOADPf7UgQoHD6p6VyTsdAtSfKdO0IAVMVp3kTmrtVJDatvOQ5p4eB9xe 7JdfhU+orWQTa1FZ8xHS4MjKF6J0Ozr9q6HPq1O+r1VVkbDDVTLt4Kv6mNTjIGoQhkjq 1O6WiFq+4An5MET5k+Xd61tqYd6SbJykJq/WuesCRQJDjzOTFWdyI3Ou+JokuO8N8+ya JlCdbu5WXeqUPZVtuDOr7AKlDz2QtrB+9rpu7ABiphJ9UV8oOlSkZLFHbCD1IKBLWXyz f5XdzC2gNf0f6c4HbtA6yHk1Mnn/RcLLYoxF76+s/jINh+Tr1Er0pzvohzfau6mLXr15 0lZg== X-Gm-Message-State: ACrzQf0RWMcUvNftp1k0vctNBsiHoZsaNlUJ1iWL+H9B6lo98GSukXG6 zOO+ppqOIN8qOAYj/WAyM6l5iEehlSpWWamfSbpDOMcLgx0NAnRPbh3kShS/5e0IygQymT7X05m 0Rt6KM704FLuGrMqqkUAmWXjr7o48dvf3TnH/7PjMOeQ1X4dXXxt/4SeD+OafjbF/0QI= X-Received: by 2002:a17:907:7e93:b0:782:d87a:b6d7 with SMTP id qb19-20020a1709077e9300b00782d87ab6d7mr26441764ejc.326.1665664683400; Thu, 13 Oct 2022 05:38:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5rFNS87jdlNPEZ7WWEJn89+rZPTqyjsGziZMcVfRvKDYgX1uwgV+7XDpfrIn9JeOPCcqAeyg== X-Received: by 2002:a17:907:7e93:b0:782:d87a:b6d7 with SMTP id qb19-20020a1709077e9300b00782d87ab6d7mr26441739ejc.326.1665664683125; Thu, 13 Oct 2022 05:38:03 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 17/24] parallels: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:04 +0200 Message-Id: <20221013123711.620631-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665668915632100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/parallels.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index c1523e7dab..7f2c1a335d 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -205,18 +205,18 @@ static coroutine_fn int64_t allocate_clusters(BlockDr= iverState *bs, * force the safer-but-slower fallocate. */ if (s->prealloc_mode =3D=3D PRL_PREALLOC_MODE_TRUNCATE) { - ret =3D bdrv_truncate(bs->file, - (s->data_end + space) << BDRV_SECTOR_BITS, - false, PREALLOC_MODE_OFF, BDRV_REQ_ZERO_WR= ITE, - NULL); + ret =3D bdrv_co_truncate(bs->file, + (s->data_end + space) << BDRV_SECTOR_BI= TS, + false, PREALLOC_MODE_OFF, + BDRV_REQ_ZERO_WRITE, NULL); if (ret =3D=3D -ENOTSUP) { s->prealloc_mode =3D PRL_PREALLOC_MODE_FALLOCATE; } } if (s->prealloc_mode =3D=3D PRL_PREALLOC_MODE_FALLOCATE) { - ret =3D bdrv_pwrite_zeroes(bs->file, - s->data_end << BDRV_SECTOR_BITS, - space << BDRV_SECTOR_BITS, 0); + ret =3D bdrv_co_pwrite_zeroes(bs->file, + s->data_end << BDRV_SECTOR_BITS, + space << BDRV_SECTOR_BITS, 0); } if (ret < 0) { return ret; @@ -278,8 +278,8 @@ static coroutine_fn int parallels_co_flush_to_os(BlockD= riverState *bs) if (off + to_write > s->header_size) { to_write =3D s->header_size - off; } - ret =3D bdrv_pwrite(bs->file, off, to_write, (uint8_t *)s->header = + off, - 0); + ret =3D bdrv_co_pwrite(bs->file, off, to_write, + (uint8_t *)s->header + off, 0); if (ret < 0) { qemu_co_mutex_unlock(&s->lock); return ret; @@ -504,8 +504,8 @@ static int coroutine_fn parallels_co_check(BlockDriverS= tate *bs, * In order to really repair the image, we must shrink it. * That means we have to pass exact=3Dtrue. */ - ret =3D bdrv_truncate(bs->file, res->image_end_offset, true, - PREALLOC_MODE_OFF, 0, &local_err); + ret =3D bdrv_co_truncate(bs->file, res->image_end_offset, true, + PREALLOC_MODE_OFF, 0, &local_err); if (ret < 0) { error_report_err(local_err); res->check_errors++; @@ -600,12 +600,12 @@ static int coroutine_fn parallels_co_create(BlockdevC= reateOptions* opts, memset(tmp, 0, sizeof(tmp)); memcpy(tmp, &header, sizeof(header)); =20 - ret =3D blk_pwrite(blk, 0, BDRV_SECTOR_SIZE, tmp, 0); + ret =3D blk_co_pwrite(blk, 0, BDRV_SECTOR_SIZE, tmp, 0); if (ret < 0) { goto exit; } - ret =3D blk_pwrite_zeroes(blk, BDRV_SECTOR_SIZE, - (bat_sectors - 1) << BDRV_SECTOR_BITS, 0); + ret =3D blk_co_pwrite_zeroes(blk, BDRV_SECTOR_SIZE, + (bat_sectors - 1) << BDRV_SECTOR_BITS, 0); if (ret < 0) { goto exit; } --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665668205; cv=none; d=zohomail.com; s=zohoarc; b=WsZLD0H5vlLbW6d1rEW2cIbAzuHQmHSZ2oiVVciZaG+N1If8NNCNWtatXaOV7ZIoVKR32almQdypQH/FFUBuMXE22mkWrcZdkxHWMimSd1YQ2+bEyNO9Kd+dFJzXODEQgltKnqaTjGIJb3e1TzhJS1IMJRp79MQUgkRJRU8wECg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665668205; 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=MHo7TuLTz9SaSlDT6txPvAlHHfwUvgMcfup0alXXTqM=; b=KIZ4uRhQRjUDiZkFo5LJKvWVrc0iW6WPcDbb011hbQgMFXan+/j+jtYFBJr9wt7NEzeAmE5CbOYkZM22mon+dOJKX8crw4xov0DEtiIesO4npZ7GqWqvb+hra/z0/aJSejDLkgwDqMHw3Ez7oF8E9WWm/vNxdIJblVfeAMx4/0c= 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 1665668205954408.47214977765407; Thu, 13 Oct 2022 06:36:45 -0700 (PDT) Received: from localhost ([::1]:38572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiyOC-0003oy-R7 for importer@patchew.org; Thu, 13 Oct 2022 09:36:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixUD-0001rA-RV for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixUA-0004H0-6E for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:53 -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-206-K1p1y81CP72Q-5N1vLfOSA-1; Thu, 13 Oct 2022 08:38:08 -0400 Received: by mail-ej1-f69.google.com with SMTP id hd11-20020a170907968b00b0078df60485fdso836340ejc.17 for ; Thu, 13 Oct 2022 05:38:07 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id v1-20020a1709067d8100b0078d957e65b6sm2985794ejo.23.2022.10.13.05.38.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664689; 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=MHo7TuLTz9SaSlDT6txPvAlHHfwUvgMcfup0alXXTqM=; b=BQTpXpiHbEaxXskaDiCxM0IiM0D+n1HZveYYQyMunKu9kUFGa6kLEZQA0zq0Q9hnGbfNLk qM8SzrFZAt2my6PxsajNhh44I2n0XTW7F+IUOX1PttjQlgVY1jYoVR6my1NWSlRXTDrfqR KFMWlaKvjohNE8oe1eaGw3XeyTohhu8= X-MC-Unique: K1p1y81CP72Q-5N1vLfOSA-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:message-id:reply-to; bh=MHo7TuLTz9SaSlDT6txPvAlHHfwUvgMcfup0alXXTqM=; b=lED5u/ecu6/PeqddWR5fJBjDt0zdZPelydfDwGGT6P94Dg43hKfKB+m59rjIbajgok QYPxqnV9BAKrH0ihg4XifmH8k7fl3ZSorGWuN4g0Nq+0Wn2VvvvKfo4sJCd7cT8vHCoR GI54Ze/kpoP3bUTdsFGutGbY/5diAhN2fvn+x35ItKS65ooU03PLPGA1sc9H7G9E2Alk qFztrtYynwM6SxwrflNZPMjMc3hm7NJGfw1s+iAMjj8x8wmV7VSyKDRN5OnK8TuuGPMd FwTyrwZFX4PFbbAz2CI9WQupopVtdpUV2283KkFdEAskpLiuJb+JxNyagsWSIie+ODVE 050w== X-Gm-Message-State: ACrzQf3EMd1Dmf1LWr/CQzUjHwafeX9ogXR4aGi+G0McjuMo/xiYpql+ Q2mVB3tj/wQcYXoRLmxwzhZ2Ytp+C6eROuXVEdUci/C1VxxbQX/UV1M9PYQjc5r9wGd98Wg+lpX lEiEf3n70xQJI1/jZcJtIQ4bV0tsSh660vt7QMsfxe8RixITnvhyNTxr+a2wf0RZOswI= X-Received: by 2002:aa7:cd4f:0:b0:458:6077:c3ac with SMTP id v15-20020aa7cd4f000000b004586077c3acmr31897849edw.32.1665664686304; Thu, 13 Oct 2022 05:38:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7X29K2btmwPZhZVOy4dNrh/pvfTm+Bd9rf8UWtazNOTpvg+SXp74wEAYpJAZkH28q6hfdKtA== X-Received: by 2002:aa7:cd4f:0:b0:458:6077:c3ac with SMTP id v15-20020aa7cd4f000000b004586077c3acmr31897819edw.32.1665664686025; Thu, 13 Oct 2022 05:38:06 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 18/24] qcow: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:05 +0200 Message-Id: <20221013123711.620631-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665668207258100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qcow.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 7f07c00c0f..133705f4ff 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -381,9 +381,9 @@ static int coroutine_fn get_cluster_offset(BlockDriverS= tate *bs, s->l1_table[l1_index] =3D l2_offset; tmp =3D cpu_to_be64(l2_offset); BLKDBG_EVENT(bs->file, BLKDBG_L1_UPDATE); - ret =3D bdrv_pwrite_sync(bs->file, - s->l1_table_offset + l1_index * sizeof(tmp), - sizeof(tmp), &tmp, 0); + ret =3D bdrv_co_pwrite_sync(bs->file, + s->l1_table_offset + l1_index * sizeof(t= mp), + sizeof(tmp), &tmp, 0); if (ret < 0) { return ret; } @@ -414,14 +414,14 @@ static int coroutine_fn get_cluster_offset(BlockDrive= rState *bs, BLKDBG_EVENT(bs->file, BLKDBG_L2_LOAD); if (new_l2_table) { memset(l2_table, 0, s->l2_size * sizeof(uint64_t)); - ret =3D bdrv_pwrite_sync(bs->file, l2_offset, - s->l2_size * sizeof(uint64_t), l2_table, 0); + ret =3D bdrv_co_pwrite_sync(bs->file, l2_offset, + s->l2_size * sizeof(uint64_t), l2_table,= 0); if (ret < 0) { return ret; } } else { - ret =3D bdrv_pread(bs->file, l2_offset, s->l2_size * sizeof(uint64= _t), - l2_table, 0); + ret =3D bdrv_co_pread(bs->file, l2_offset, + s->l2_size * sizeof(uint64_t), l2_table, 0); if (ret < 0) { return ret; } @@ -453,8 +453,8 @@ static int coroutine_fn get_cluster_offset(BlockDriverS= tate *bs, cluster_offset =3D QEMU_ALIGN_UP(cluster_offset, s->cluster_si= ze); /* write the cluster content */ BLKDBG_EVENT(bs->file, BLKDBG_WRITE_AIO); - ret =3D bdrv_pwrite(bs->file, cluster_offset, s->cluster_size, - s->cluster_cache, 0); + ret =3D bdrv_co_pwrite(bs->file, cluster_offset, s->cluster_si= ze, + s->cluster_cache, 0); if (ret < 0) { return ret; } @@ -469,8 +469,8 @@ static int coroutine_fn get_cluster_offset(BlockDriverS= tate *bs, if (cluster_offset + s->cluster_size > INT64_MAX) { return -E2BIG; } - ret =3D bdrv_truncate(bs->file, cluster_offset + s->cluste= r_size, - false, PREALLOC_MODE_OFF, 0, NULL); + ret =3D bdrv_co_truncate(bs->file, cluster_offset + s->clu= ster_size, + false, PREALLOC_MODE_OFF, 0, NULL); if (ret < 0) { return ret; } @@ -492,9 +492,9 @@ static int coroutine_fn get_cluster_offset(BlockDriverS= tate *bs, return -EIO; } BLKDBG_EVENT(bs->file, BLKDBG_WRITE_AIO); - ret =3D bdrv_pwrite(bs->file, cluster_offset += i, - BDRV_SECTOR_SIZE, - s->cluster_data, 0); + ret =3D bdrv_co_pwrite(bs->file, cluster_offse= t + i, + BDRV_SECTOR_SIZE, + s->cluster_data, 0); if (ret < 0) { return ret; } @@ -514,8 +514,8 @@ static int coroutine_fn get_cluster_offset(BlockDriverS= tate *bs, } else { BLKDBG_EVENT(bs->file, BLKDBG_L2_UPDATE); } - ret =3D bdrv_pwrite_sync(bs->file, l2_offset + l2_index * sizeof(t= mp), - sizeof(tmp), &tmp, 0); + ret =3D bdrv_co_pwrite_sync(bs->file, l2_offset + l2_index * sizeo= f(tmp), + sizeof(tmp), &tmp, 0); if (ret < 0) { return ret; } @@ -596,7 +596,7 @@ static int coroutine_fn decompress_cluster(BlockDriverS= tate *bs, uint64_t cluste csize =3D cluster_offset >> (63 - s->cluster_bits); csize &=3D (s->cluster_size - 1); BLKDBG_EVENT(bs->file, BLKDBG_READ_COMPRESSED); - ret =3D bdrv_pread(bs->file, coffset, csize, s->cluster_data, 0); + ret =3D bdrv_co_pread(bs->file, coffset, csize, s->cluster_data, 0= ); if (ret < 0) return -1; if (decompress_buffer(s->cluster_cache, s->cluster_size, @@ -890,14 +890,14 @@ static int coroutine_fn qcow_co_create(BlockdevCreate= Options *opts, } =20 /* write all the data */ - ret =3D blk_pwrite(qcow_blk, 0, sizeof(header), &header, 0); + ret =3D blk_co_pwrite(qcow_blk, 0, sizeof(header), &header, 0); if (ret < 0) { goto exit; } =20 if (qcow_opts->has_backing_file) { - ret =3D blk_pwrite(qcow_blk, sizeof(header), backing_filename_len, - qcow_opts->backing_file, 0); + ret =3D blk_co_pwrite(qcow_blk, sizeof(header), backing_filename_l= en, + qcow_opts->backing_file, 0); if (ret < 0) { goto exit; } @@ -906,8 +906,8 @@ static int coroutine_fn qcow_co_create(BlockdevCreateOp= tions *opts, tmp =3D g_malloc0(BDRV_SECTOR_SIZE); for (i =3D 0; i < DIV_ROUND_UP(sizeof(uint64_t) * l1_size, BDRV_SECTOR= _SIZE); i++) { - ret =3D blk_pwrite(qcow_blk, header_size + BDRV_SECTOR_SIZE * i, - BDRV_SECTOR_SIZE, tmp, 0); + ret =3D blk_co_pwrite(qcow_blk, header_size + BDRV_SECTOR_SIZE * i, + BDRV_SECTOR_SIZE, tmp, 0); if (ret < 0) { g_free(tmp); goto exit; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665669511; cv=none; d=zohomail.com; s=zohoarc; b=R/RmmiuXw9haoq7oahowmahyfl32DJGkzqahR1HHKJHlpuHLpXuG7D4dgha71+FSw8rXHV/CG4dzS3X0oO9ZGdsDov8weJgaHSISa6DJoP6ajO6oUI7Ksli7JVPeKg7K7+MyvlPl/NulJhWaGq2QCrWFkFPQT53fy49sIa3ewCA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665669511; 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=3ikEvi53dha0Sk0fNu/zC5nmA0EkgX1CV2qFD4podpc=; b=UlmfRp+nq3+HzCVT99nL19ukqHiaY3g4MhoSC3bHMcm5YHW8D1/B1835eErkoQ8cX3QY1LYaGnr8GIe05F5Mj1I/8L3J49xo+53b5P6viokKMAizz8kNjpaODIcxMwroJRpodYg7xjJyydu05v45zrtlo/DTeNe0VAgl2DWUk6E= 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 1665669511874728.8785894289148; Thu, 13 Oct 2022 06:58:31 -0700 (PDT) Received: from localhost ([::1]:39348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiy2D-0004aH-Lz for importer@patchew.org; Thu, 13 Oct 2022 09:14:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixUC-0001pw-Gr for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixU9-0004HB-6V for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:50 -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-508-GHYB5kGGOCqyvD31j8tRmw-1; Thu, 13 Oct 2022 08:38:10 -0400 Received: by mail-ed1-f70.google.com with SMTP id v4-20020a056402348400b0045bd50cb9adso1442243edc.0 for ; Thu, 13 Oct 2022 05:38:10 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id l10-20020a1709060cca00b0078a543e9301sm2897244ejh.200.2022.10.13.05.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664691; 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=3ikEvi53dha0Sk0fNu/zC5nmA0EkgX1CV2qFD4podpc=; b=OvabVst4qdslunfjypts1I2xru4ywpDXq9MixeZ3tbPeffqZbL+GQx9t+DuaJOfO3lqWkD BYoLL79UajydNb+w5uwgGAd5U2J2BpjmzW4leyQx73aEpMya1yCE5CfbqRGI7CVB7miNWy bBSYEy2Wg0zCGw6wgO4IGFmBFvY+4/Y= X-MC-Unique: GHYB5kGGOCqyvD31j8tRmw-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:message-id:reply-to; bh=3ikEvi53dha0Sk0fNu/zC5nmA0EkgX1CV2qFD4podpc=; b=Wikxlmgx6yCqHtqW5PCbIRh5xO4Q+eQLjyiqCyyAKkuYwdWkXuQ8n31aC0brV1CUbM cXaR3rS4DqGfF2ucG80T8M7u9re7ERxBdxY+jUgnraOuTg4VuyXEKIwg54ojdlSFZWuK OdlLd8rSRNrQ5Kv8FN1fJGVVQ44pNbbQISMp7jOdk6KpUVSwBjQFs8tJaNgWtMUEVDgT OKzNqHT9jn/m2B3CQLBy3onbIorK8DFbU+mi6k8MEmxh0GZcc9w8YI0F9yHvOElvlXA+ vZQprK/HkS0w0MVsmG/BeJDgVaoqW9yntDkoJoOoOfsa1a3t+nOREt2kqUFRmwvAPmYw NpCA== X-Gm-Message-State: ACrzQf2ZF5chTKS0+AglBvNI+vLcIlq8OPzMyMbKxzxjJSJBMiEo4hHb JVCSDiG5Gg7auj0kz/4wHWqVoeJb5I3qaYlg0KjRTGzSYDlUKxwLTDHeoAaVaWiH4QbsyKu2bU7 ExeaStPaWGztQpaqnxje1NXZ27JP6zJ5RfEymsz0LYNi8d1DWz8+ap/KSKVuBpWttsbY= X-Received: by 2002:a17:906:5daa:b0:78d:fa76:f837 with SMTP id n10-20020a1709065daa00b0078dfa76f837mr4927003ejv.239.1665664689235; Thu, 13 Oct 2022 05:38:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jHXVYrfUBPCTuIXujmfwsaQxxVUZx3rTPvV+zWZiye/eMPbnzAZwyO9DDgnwM+Svu38xrIg== X-Received: by 2002:a17:906:5daa:b0:78d:fa76:f837 with SMTP id n10-20020a1709065daa00b0078dfa76f837mr4926982ejv.239.1665664688819; Thu, 13 Oct 2022 05:38:08 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 19/24] qcow2: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:06 +0200 Message-Id: <20221013123711.620631-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665669512531100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qcow2-cluster.c | 8 ++++---- block/qcow2-refcount.c | 10 +++++----- block/qcow2-snapshot.c | 6 +++--- block/qcow2.c | 24 ++++++++++++------------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 523c37215a..f480a29ae3 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -47,14 +47,14 @@ int coroutine_fn qcow2_shrink_l1_table(BlockDriverState= *bs, uint64_t exact_size #endif =20 BLKDBG_EVENT(bs->file, BLKDBG_L1_SHRINK_WRITE_TABLE); - ret =3D bdrv_pwrite_zeroes(bs->file, s->l1_table_offset + - new_l1_size * L1E_SIZE, - (s->l1_size - new_l1_size) * L1E_SIZE, 0); + ret =3D bdrv_co_pwrite_zeroes(bs->file, s->l1_table_offset + + new_l1_size * L1E_SIZE, + (s->l1_size - new_l1_size) * L1E_SIZE, 0); if (ret < 0) { goto fail; } =20 - ret =3D bdrv_flush(bs->file->bs); + ret =3D bdrv_co_flush(bs->file->bs); if (ret < 0) { goto fail; } diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 38861ed7c8..c7cb48b0c4 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -118,8 +118,8 @@ int coroutine_fn qcow2_refcount_init(BlockDriverState *= bs) goto fail; } BLKDBG_EVENT(bs->file, BLKDBG_REFTABLE_LOAD); - ret =3D bdrv_pread(bs->file, s->refcount_table_offset, - refcount_table_size2, s->refcount_table, 0); + ret =3D bdrv_co_pread(bs->file, s->refcount_table_offset, + refcount_table_size2, s->refcount_table, 0); if (ret < 0) { goto fail; } @@ -3657,9 +3657,9 @@ int coroutine_fn qcow2_shrink_reftable(BlockDriverSta= te *bs) reftable_tmp[i] =3D unused_block ? 0 : cpu_to_be64(s->refcount_tab= le[i]); } =20 - ret =3D bdrv_pwrite_sync(bs->file, s->refcount_table_offset, - s->refcount_table_size * REFTABLE_ENTRY_SIZE, - reftable_tmp, 0); + ret =3D bdrv_co_pwrite_sync(bs->file, s->refcount_table_offset, + s->refcount_table_size * REFTABLE_ENTRY_SIZE, + reftable_tmp, 0); /* * If the write in the reftable failed the image may contain a partial= ly * overwritten reftable. In this case it would be better to clear the diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index d1d46facbf..62e8a0335d 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -441,9 +441,9 @@ int coroutine_fn qcow2_check_read_snapshot_table(BlockD= riverState *bs, } QEMU_PACKED snapshot_table_pointer; =20 /* qcow2_do_open() discards this information in check mode */ - ret =3D bdrv_pread(bs->file, offsetof(QCowHeader, nb_snapshots), - sizeof(snapshot_table_pointer), &snapshot_table_point= er, - 0); + ret =3D bdrv_co_pread(bs->file, offsetof(QCowHeader, nb_snapshots), + sizeof(snapshot_table_pointer), &snapshot_table_po= inter, + 0); if (ret < 0) { result->check_errors++; fprintf(stderr, "ERROR failed to read the snapshot table pointer f= rom " diff --git a/block/qcow2.c b/block/qcow2.c index b7cac50eb3..8d6e576f28 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1306,7 +1306,7 @@ static int coroutine_fn qcow2_do_open(BlockDriverStat= e *bs, QDict *options, uint64_t l1_vm_state_index; bool update_header =3D false; =20 - ret =3D bdrv_pread(bs->file, 0, sizeof(header), &header, 0); + ret =3D bdrv_co_pread(bs->file, 0, sizeof(header), &header, 0); if (ret < 0) { error_setg_errno(errp, -ret, "Could not read qcow2 header"); goto fail; @@ -1382,9 +1382,9 @@ static int coroutine_fn qcow2_do_open(BlockDriverStat= e *bs, QDict *options, if (header.header_length > sizeof(header)) { s->unknown_header_fields_size =3D header.header_length - sizeof(he= ader); s->unknown_header_fields =3D g_malloc(s->unknown_header_fields_siz= e); - ret =3D bdrv_pread(bs->file, sizeof(header), - s->unknown_header_fields_size, - s->unknown_header_fields, 0); + ret =3D bdrv_co_pread(bs->file, sizeof(header), + s->unknown_header_fields_size, + s->unknown_header_fields, 0); if (ret < 0) { error_setg_errno(errp, -ret, "Could not read unknown qcow2 hea= der " "fields"); @@ -1579,8 +1579,8 @@ static int coroutine_fn qcow2_do_open(BlockDriverStat= e *bs, QDict *options, ret =3D -ENOMEM; goto fail; } - ret =3D bdrv_pread(bs->file, s->l1_table_offset, s->l1_size * L1E_= SIZE, - s->l1_table, 0); + ret =3D bdrv_co_pread(bs->file, s->l1_table_offset, s->l1_size * L= 1E_SIZE, + s->l1_table, 0); if (ret < 0) { error_setg_errno(errp, -ret, "Could not read L1 table"); goto fail; @@ -1699,8 +1699,8 @@ static int coroutine_fn qcow2_do_open(BlockDriverStat= e *bs, QDict *options, } =20 s->image_backing_file =3D g_malloc(len + 1); - ret =3D bdrv_pread(bs->file, header.backing_file_offset, len, - s->image_backing_file, 0); + ret =3D bdrv_co_pread(bs->file, header.backing_file_offset, len, + bs->auto_backing_file, 0); if (ret < 0) { error_setg_errno(errp, -ret, "Could not read backing file name= "); goto fail; @@ -3679,7 +3679,7 @@ qcow2_co_create(BlockdevCreateOptions *create_options= , Error **errp) cpu_to_be64(QCOW2_INCOMPAT_EXTL2); } =20 - ret =3D blk_pwrite(blk, 0, cluster_size, header, 0); + ret =3D blk_co_pwrite(blk, 0, cluster_size, header, 0); g_free(header); if (ret < 0) { error_setg_errno(errp, -ret, "Could not write qcow2 header"); @@ -3689,7 +3689,7 @@ qcow2_co_create(BlockdevCreateOptions *create_options= , Error **errp) /* Write a refcount table with one refcount block */ refcount_table =3D g_malloc0(2 * cluster_size); refcount_table[0] =3D cpu_to_be64(2 * cluster_size); - ret =3D blk_pwrite(blk, cluster_size, 2 * cluster_size, refcount_table= , 0); + ret =3D blk_co_pwrite(blk, cluster_size, 2 * cluster_size, refcount_ta= ble, 0); g_free(refcount_table); =20 if (ret < 0) { @@ -3744,8 +3744,8 @@ qcow2_co_create(BlockdevCreateOptions *create_options= , Error **errp) } =20 /* Okay, now that we have a valid image, let's give it the right size = */ - ret =3D blk_truncate(blk, qcow2_opts->size, false, qcow2_opts->preallo= cation, - 0, errp); + ret =3D blk_co_truncate(blk, qcow2_opts->size, false, + qcow2_opts->preallocation, 0, errp); if (ret < 0) { error_prepend(errp, "Could not resize image: "); goto out; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665668426; cv=none; d=zohomail.com; s=zohoarc; b=FR6KfFrCew0qKgu4Qaca9JXhXqjbeyMIepvSAADH/c0zeGmwO9ZdN6LuaKMTmLVj3DbNbHSPc0Ds88X26VUcWylvQeUyMIqb6nBvtpuag0lqJQCvv2jd6LfQJ3QWCXQB6QRDQLmFGxvf+m1rEs2Kw35MyXkuE6bvwXiY8J37K58= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665668426; 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=oMZDgsaYj80/GJ1HJPhUO0ubRRXW6pZjfvysmi70baU=; b=jsEWAfXmXhYizvzv/tIk9iv3drBxEE1YrbPOAWV4XGFa3auoNONdAy4l0oPdx02BY7kcI/hAawzeeezMEvWV2cHWnIYa7VHmQqOXoi+pK3HR4RiyCcND5aETUZCd0UwgaikzlsGXytM74wtiCDNgOEKy8kYXTzSMAZdKyzNF7/I= 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 1665668426187744.7890912674732; Thu, 13 Oct 2022 06:40:26 -0700 (PDT) Received: from localhost ([::1]:46644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiyRi-0000mi-SB for importer@patchew.org; Thu, 13 Oct 2022 09:40:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixUM-0001v5-Rv for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:39:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:44391) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixU8-0004HN-5P for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:39:02 -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-633--XXxbNyqNwuf7MUMC_n50w-1; Thu, 13 Oct 2022 08:38:13 -0400 Received: by mail-ed1-f69.google.com with SMTP id f16-20020a0564021e9000b0045beb029117so1408471edf.12 for ; Thu, 13 Oct 2022 05:38:13 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id e11-20020a170906314b00b0073ddb2eff27sm2928911eje.167.2022.10.13.05.38.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664694; 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=oMZDgsaYj80/GJ1HJPhUO0ubRRXW6pZjfvysmi70baU=; b=W51rzSiDD0PrHL/WiAumdePQrDCrJKmo81eM2jPky+1nVWueo1g2DqHTuGKmuJKZQ+J/SF JZVkZPMNMC46YRi5mg9I7jEQL/9AGJi4nA2vFhllJeZIWs0i6t7XJXJXGPVxin3CDZTpP+ 43+vdRKW01avDJ2aJ7BXWvc0+E/3H8E= X-MC-Unique: -XXxbNyqNwuf7MUMC_n50w-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:message-id:reply-to; bh=oMZDgsaYj80/GJ1HJPhUO0ubRRXW6pZjfvysmi70baU=; b=R8/DI/crCnAIXJyX3cppd+zQoJ3Q2GcDNFMp07YZU1JZt5CZFelCdAcAP4qJDSLQBU vcE9e+nhONLrQJrG2TbY1BXwkQOfTfLS8fjCnYTQnMWXNCotRJ0d792d9t0purX/XwGP 6t0ZD/h46f5UXm0gTDj/iywQJWBgevx5IZnt/7PfZsNWIWdT2Zhjs5uRS8JOEwPvE7i3 AH01OIVtCpv5r35YpmqXn376vZ7yDAKj7wKlWG0dpGZeLAti57HJ1lRPMYUbZkstAFhB O/BfCKipNEcPikd+C+OvO1/nkHYzlzj9T5UQyx0L4cxqEJJuEPW/JofHLpnI47gCHysL VjwA== X-Gm-Message-State: ACrzQf0mFuXl4A4LhhmuMV9jemKojhLPm4JkyO43/+r9/qxp2P+tCKaY Hl2Z0FrDppcmzdaDbxnu3OUR6ry3u45dMFqiAv6lM2ncU3WBBNkxlPAzS8+TCLWiSn4L7P7SuJT 79Nuj/3a2DLrS/7kO2gzbvFAz3zIqx2p36M9cR5heOC1gSWUZLOevWd0CIhTlUU9zx5E= X-Received: by 2002:a17:907:70a:b0:741:78ab:dce5 with SMTP id xb10-20020a170907070a00b0074178abdce5mr26660393ejb.527.1665664692187; Thu, 13 Oct 2022 05:38:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4poz8zoqYdZt33SNWW2wX2J/cIxigh11g9bCg6I7EX/fJTLlIdM6aLCr4q4A+6gqFKLzC5vQ== X-Received: by 2002:a17:907:70a:b0:741:78ab:dce5 with SMTP id xb10-20020a170907070a00b0074178abdce5mr26660373ejb.527.1665664691940; Thu, 13 Oct 2022 05:38:11 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 20/24] qed: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:07 +0200 Message-Id: <20221013123711.620631-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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: 1665668427176100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qed-table.c | 2 +- block/qed.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/block/qed-table.c b/block/qed-table.c index 1cc844b1a5..aa203f2627 100644 --- a/block/qed-table.c +++ b/block/qed-table.c @@ -100,7 +100,7 @@ static int coroutine_fn qed_write_table(BDRVQEDState *s= , uint64_t offset, } =20 if (flush) { - ret =3D bdrv_flush(s->bs); + ret =3D bdrv_co_flush(s->bs); if (ret < 0) { goto out; } diff --git a/block/qed.c b/block/qed.c index bda00e6257..90682f7a15 100644 --- a/block/qed.c +++ b/block/qed.c @@ -387,7 +387,7 @@ static int coroutine_fn bdrv_qed_do_open(BlockDriverSta= te *bs, QDict *options, int64_t file_size; int ret; =20 - ret =3D bdrv_pread(bs->file, 0, sizeof(le_header), &le_header, 0); + ret =3D bdrv_co_pread(bs->file, 0, sizeof(le_header), &le_header, 0); if (ret < 0) { error_setg(errp, "Failed to read QED header"); return ret; @@ -492,7 +492,7 @@ static int coroutine_fn bdrv_qed_do_open(BlockDriverSta= te *bs, QDict *options, } =20 /* From here on only known autoclear feature bits are valid */ - bdrv_flush(bs->file->bs); + bdrv_co_flush(bs->file->bs); } =20 s->l1_table =3D qed_alloc_table(s); @@ -693,7 +693,7 @@ static int coroutine_fn bdrv_qed_co_create(BlockdevCrea= teOptions *opts, * The QED format associates file length with allocation status, * so a new file (which is empty) must have a length of 0. */ - ret =3D blk_truncate(blk, 0, true, PREALLOC_MODE_OFF, 0, errp); + ret =3D blk_co_truncate(blk, 0, true, PREALLOC_MODE_OFF, 0, errp); if (ret < 0) { goto out; } @@ -712,18 +712,18 @@ static int coroutine_fn bdrv_qed_co_create(BlockdevCr= eateOptions *opts, } =20 qed_header_cpu_to_le(&header, &le_header); - ret =3D blk_pwrite(blk, 0, sizeof(le_header), &le_header, 0); + ret =3D blk_co_pwrite(blk, 0, sizeof(le_header), &le_header, 0); if (ret < 0) { goto out; } - ret =3D blk_pwrite(blk, sizeof(le_header), header.backing_filename_siz= e, + ret =3D blk_co_pwrite(blk, sizeof(le_header), header.backing_filename_= size, qed_opts->backing_file, 0); if (ret < 0) { goto out; } =20 l1_table =3D g_malloc0(l1_size); - ret =3D blk_pwrite(blk, header.l1_table_offset, l1_size, l1_table, 0); + ret =3D blk_co_pwrite(blk, header.l1_table_offset, l1_size, l1_table, = 0); if (ret < 0) { goto out; } --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665666251; cv=none; d=zohomail.com; s=zohoarc; b=lxx2M7ojGj2WNNEI9Sh57EPK0f8szzHgtfhwI+qfGuoxQPz/Tlv9eIvqSzSmNeFkKWTMklcYhlWfqlP0yX78ia2qNvrtcRmSudyhjhMx5x5fSCiAYjeGXDTn+wl8LZf8U348uC6NygCSwNDQVngaPSe65gl+mqoOKdiXxRxJsWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665666251; 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=oNFx5/K1a3V3pRYlIt3h1gVdlhsBpwN6ccrfN2/Fbao=; b=K9UWF6HcZr2wR8ZdR0o2O6TYM/wQ2AgnEUfOHcETDgZcWSKv+zH0f1eqcDZZ7aPo+n65cOq7GGj5E7lIZS100hqeHqGHginYumRRJmXScxHjYD5ZTc6JOIr+55R++DRcqM5yHSVFT2KiSG+Jqo2UVQmSANbJu4NzsmoVDGfk5pI= 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 1665666251626146.76474519956366; Thu, 13 Oct 2022 06:04:11 -0700 (PDT) Received: from localhost ([::1]:35000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oixsf-0000en-7T for importer@patchew.org; Thu, 13 Oct 2022 09:04:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixU0-0001ih-Vi for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixTi-0004HU-JS for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:33 -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-594-DLprlRHCM9iLnKJeK7mbrg-1; Thu, 13 Oct 2022 08:38:17 -0400 Received: by mail-ed1-f69.google.com with SMTP id y6-20020a056402358600b0045932521633so1418172edc.17 for ; Thu, 13 Oct 2022 05:38:16 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id gc22-20020a1709072b1600b0078cf8a743d6sm2918473ejc.100.2022.10.13.05.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664698; 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=oNFx5/K1a3V3pRYlIt3h1gVdlhsBpwN6ccrfN2/Fbao=; b=X29Zzn3MBOzfmoqopalECKZIvbF7IT4xYQtUcj/RciIbtyNG0AUaUPRjBfnCC2IWAmTWFJ Z9DKO/a5RArBIIzaoVqK0VVshSoLAntS+nCZ6gLLL4BV47sZ2d4spBG7zUQlWNIakOnuZW hUqNMQm6V6WZYjP/zoiWilc8PlZ6R6o= X-MC-Unique: DLprlRHCM9iLnKJeK7mbrg-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:message-id:reply-to; bh=oNFx5/K1a3V3pRYlIt3h1gVdlhsBpwN6ccrfN2/Fbao=; b=ViAqlOVQQAn5co9qVhx2/aRODTLW1y3VwheBTNDExXr1Z2uEDyIlgVy+iKKgPH+FOO QG40Ly339f/ORr3q7BDIz4xVmBLf9Vycjmo5IG9ls71f2Q6r6asqckKSb3WwwxqFFKqq gKjHD827jDOhJru6oAEt9gYO75XJ+529ILgmlw4uQ+pt1RJz78toW1UgJ4iB4JBIsUL0 fwEZ0u7zBzzy6PRdx1McewiUEdnAher1bG0H9jgBYupDlAj8ifkfP5wvkH4adPUUf+K2 3DyhOJn3ByzCZrWQ2ifzt7+HVz5/ac8pm5hc+9Ydy4RrU9HekBsoZiNvNqHnxi3l7FZP XPIA== X-Gm-Message-State: ACrzQf1pSWb/3VpCKG3fYpqGy9fdZhqQhXksLthNJbGNLu7zT9Z2Iyw4 Zefl3o0WpQrz/wfndgH+mMOnV8K39/8BZ89dS3LdJupoOQwXKssfyTKjDB+8ggHMPCMMGQBt8bc y/eIbwOFZ16PE29186V/l5Myg1hNsHp5jza/tNkM/RKnPWqayswBoOTkvmxe8/c11Ocs= X-Received: by 2002:a17:907:3e96:b0:78d:f399:57e3 with SMTP id hs22-20020a1709073e9600b0078df39957e3mr6102725ejc.699.1665664695392; Thu, 13 Oct 2022 05:38:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5zyqZAaOmlnScIFVLtMPH0qwwI/oiXdo0YCn1eMxyFzmZb3SiNPFx0MGgWxeImgFIfkeTs1g== X-Received: by 2002:a17:907:3e96:b0:78d:f399:57e3 with SMTP id hs22-20020a1709073e9600b0078df39957e3mr6102704ejc.699.1665664695035; Thu, 13 Oct 2022 05:38:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 21/24] vdi: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:08 +0200 Message-Id: <20221013123711.620631-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665666253493100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/vdi.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index e942325455..2ecf47216a 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -664,7 +664,8 @@ vdi_co_pwritev(BlockDriverState *bs, int64_t offset, in= t64_t bytes, * so this full-cluster write does not overlap a partial write * of the same cluster, issued from the "else" branch. */ - ret =3D bdrv_pwrite(bs->file, data_offset, s->block_size, bloc= k, 0); + ret =3D bdrv_co_pwrite(bs->file, data_offset, s->block_size, b= lock, + 0); qemu_co_rwlock_unlock(&s->bmap_lock); } else { nonallocating_write: @@ -709,7 +710,7 @@ nonallocating_write: assert(VDI_IS_ALLOCATED(bmap_first)); *header =3D s->header; vdi_header_to_le(header); - ret =3D bdrv_pwrite(bs->file, 0, sizeof(*header), header, 0); + ret =3D bdrv_co_pwrite(bs->file, 0, sizeof(*header), header, 0); g_free(header); =20 if (ret < 0) { @@ -726,8 +727,8 @@ nonallocating_write: base =3D ((uint8_t *)&s->bmap[0]) + bmap_first * SECTOR_SIZE; logout("will write %u block map sectors starting from entry %u\n", n_sectors, bmap_first); - ret =3D bdrv_pwrite(bs->file, offset * SECTOR_SIZE, - n_sectors * SECTOR_SIZE, base, 0); + ret =3D bdrv_co_pwrite(bs->file, offset * SECTOR_SIZE, + n_sectors * SECTOR_SIZE, base, 0); } =20 return ret; @@ -845,7 +846,7 @@ static int coroutine_fn vdi_co_do_create(BlockdevCreate= Options *create_options, vdi_header_print(&header); } vdi_header_to_le(&header); - ret =3D blk_pwrite(blk, offset, sizeof(header), &header, 0); + ret =3D blk_co_pwrite(blk, offset, sizeof(header), &header, 0); if (ret < 0) { error_setg(errp, "Error writing header"); goto exit; @@ -866,7 +867,7 @@ static int coroutine_fn vdi_co_do_create(BlockdevCreate= Options *create_options, bmap[i] =3D VDI_UNALLOCATED; } } - ret =3D blk_pwrite(blk, offset, bmap_size, bmap, 0); + ret =3D blk_co_pwrite(blk, offset, bmap_size, bmap, 0); if (ret < 0) { error_setg(errp, "Error writing bmap"); goto exit; @@ -875,8 +876,8 @@ static int coroutine_fn vdi_co_do_create(BlockdevCreate= Options *create_options, } =20 if (image_type =3D=3D VDI_TYPE_STATIC) { - ret =3D blk_truncate(blk, offset + blocks * block_size, false, - PREALLOC_MODE_OFF, 0, errp); + ret =3D blk_co_truncate(blk, offset + blocks * block_size, false, + PREALLOC_MODE_OFF, 0, errp); if (ret < 0) { error_prepend(errp, "Failed to statically allocate file"); goto exit; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665669099; cv=none; d=zohomail.com; s=zohoarc; b=ABEhW9XQ5db0l/fXZk8XWTiHrIoarkWmKY3zqY0TW6PlVr+xavmg1l6SRo2/HBSc5hrG4c9g69rzw0CP01OKeSloi4VmNXLzAgDTTID17D0yM5Smsd/f4m4g1o1mpOPzg/Gz7RWwmDmm3NJHTuZz2lcMooSr0q6uYoJp6YryNpk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665669099; 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=HtEvum89bDy7P3QnxKlNjBZFWsWoVVMcWvMHogJ1enU=; b=P3JaCXbi9zdGxmZlZ8CUgHTrXJFwuXcvPyHR/g3J6l/0+vygRE1b8LauA8hIwaf8dQd8XVm+9MLmxfa/jS7si2O5ZymowFQ/9VTjes2/ThFeK9DUMwHxupblCPFj51e07/USd9DYKQnfvxxySkCNjEB5XgXmQU2zlYN4smp0U1Y= 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 1665669099960421.97627003481284; Thu, 13 Oct 2022 06:51:39 -0700 (PDT) Received: from localhost ([::1]:50730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiy97-00036u-PP for importer@patchew.org; Thu, 13 Oct 2022 09:21:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixUA-0001mm-EH for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:26761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixU3-0004Hf-1U for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:49 -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-315-PGN9H0wpOUOyIEG-DiXPFg-1; Thu, 13 Oct 2022 08:38:19 -0400 Received: by mail-ed1-f70.google.com with SMTP id m10-20020a056402430a00b0045968bb0874so1416143edc.10 for ; Thu, 13 Oct 2022 05:38:19 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id kw24-20020a170907771800b0073d87068042sm2880255ejc.110.2022.10.13.05.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664700; 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=HtEvum89bDy7P3QnxKlNjBZFWsWoVVMcWvMHogJ1enU=; b=VRG+2Wx/FXWz+RKf6JpBX/9WrEqZ48XE3NZGVEwb/EVOCr2ZgRLGUpRZhEIScxR+7KnbzU VL6hvlzwsTqEI1wY5gMVhEvO+sFoUWwWaxykxuh2BNzuaUyi7qovS3f740AYJEXjUXbg8o 8v38T4K8R8T0GApXa9Xlry6WWFVtiGA= X-MC-Unique: PGN9H0wpOUOyIEG-DiXPFg-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:message-id:reply-to; bh=HtEvum89bDy7P3QnxKlNjBZFWsWoVVMcWvMHogJ1enU=; b=Ymft8i6o0wl5e9GIcrQD+scWt9T3MOkkyhxQkMzxsTV0WUhTR4a9C6rJ2m8sSJU90h 4VLzwrG5UAP9hWNzF5OaXtpXhuLY/FGv9ZkmBHns/S+FeBjqfvUHVj2tccMUeoCOzntv 9Yg4URDzOWOpr3lNo/xh15TRIqz41lxcVSm5DwTWSGmFFfeFNA0Zx7I3VQI8rZ2Y0Za0 vM8EKOuOwZvnvbF80hjPFNeid1WL6+LPLUPMgnihqD31UGLySeoM9nlOlLHjaSzK9jaF kN9rrCAS6cbMGJTHM6z2ebs1o+o1+HWt96TroWpM+oOzmaGGkoIf4GGRW+nt/NN1aX2H 3s9A== X-Gm-Message-State: ACrzQf2+XUMJ1wA+oGAQ3cUpajRA9dpfmFNsxVajIn7LTufqryPwXsSq LWteV/23AM875s8F42jSDgg6hAAJNSMSnTXfGGpl8ztISSjXW5jauHgcvXOtfBCcnxdNdPPw0cK cdEgpbKlSDQ6s6SmH+dLzcwZf0bXoxUcJJHGfRAIComlPNxXB1KnjORSaF/3yTDdLP0E= X-Received: by 2002:a05:6402:190f:b0:45b:d959:e2ae with SMTP id e15-20020a056402190f00b0045bd959e2aemr23994959edz.187.1665664698165; Thu, 13 Oct 2022 05:38:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4B1wlgLhgEQw3ymfAAStC+lfzWAlski8MIlkJPBeBCGXLI234TuOdtd12ULrFAmG+nQUlw/w== X-Received: by 2002:a05:6402:190f:b0:45b:d959:e2ae with SMTP id e15-20020a056402190f00b0045bd959e2aemr23994937edz.187.1665664697917; Thu, 13 Oct 2022 05:38:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 22/24] vhdx: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:09 +0200 Message-Id: <20221013123711.620631-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665669101403100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/vhdx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index e10e78ebfd..f7dd4eb092 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -2012,15 +2012,15 @@ static int coroutine_fn vhdx_co_create(BlockdevCrea= teOptions *opts, creator =3D g_utf8_to_utf16("QEMU v" QEMU_VERSION, -1, NULL, &creator_items, NULL); signature =3D cpu_to_le64(VHDX_FILE_SIGNATURE); - ret =3D blk_pwrite(blk, VHDX_FILE_ID_OFFSET, sizeof(signature), &signa= ture, - 0); + ret =3D blk_co_pwrite(blk, VHDX_FILE_ID_OFFSET, sizeof(signature), &si= gnature, + 0); if (ret < 0) { error_setg_errno(errp, -ret, "Failed to write file signature"); goto delete_and_exit; } if (creator) { - ret =3D blk_pwrite(blk, VHDX_FILE_ID_OFFSET + sizeof(signature), - creator_items * sizeof(gunichar2), creator, 0); + ret =3D blk_co_pwrite(blk, VHDX_FILE_ID_OFFSET + sizeof(signature), + creator_items * sizeof(gunichar2), creator, 0); if (ret < 0) { error_setg_errno(errp, -ret, "Failed to write creator field"); goto delete_and_exit; --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665667860; cv=none; d=zohomail.com; s=zohoarc; b=fUdx7KAbMbzIXLibNrc3m0RlorL/sWGpThm0c1hFGEesutSkY9UWvEUAOYwmNg1rbB9B9bst+RLQsuPo46nJiLy8g5jLWafjvsaI1lltzI3Yc30BFZFe+eeYRPUjidkQkxNaouBWQlRS18UQuBf5EJn3maSO7aHwb7v8qPavFLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665667860; 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=NSp74aW0LPlHnI4gB6AAeUT1xbp0j2K7e5mEhLbWUrU=; b=i2+J95h7V1p7j2xlcXwrnl6lGnOwA4ipB7oNjvEvy2W9gLSIbUy+e6sSE3zmDML9xoOqt7HL3By1A8dNQXERdiy0VPz6nV+uxUVjwRP9xhfW6Ii1f5Jb3KJYcgudHv3lSNTxPKVVmOutF/4rOgJyS9E7vETatZFIcuetJyiElq8= 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 1665667860318779.7863897018078; Thu, 13 Oct 2022 06:31:00 -0700 (PDT) Received: from localhost ([::1]:40736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiyIa-0006LA-AR for importer@patchew.org; Thu, 13 Oct 2022 09:30:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixUC-0001pz-Hz for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixU9-0004Hx-81 for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:52 -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-52-on9OfpdMNXaRmlQCc9kKDA-1; Thu, 13 Oct 2022 08:38:22 -0400 Received: by mail-ej1-f70.google.com with SMTP id qa14-20020a170907868e00b0078db5ba61bdso829033ejc.12 for ; Thu, 13 Oct 2022 05:38:22 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id y10-20020a170906558a00b0073d796a1043sm2933262ejp.123.2022.10.13.05.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664703; 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=NSp74aW0LPlHnI4gB6AAeUT1xbp0j2K7e5mEhLbWUrU=; b=iyJHKAcfK4c4nvkiuxJdrXpb74ktvO/ne8zoh3NBl9WBRjMpiTHVfD+AQvbZAsHwoQgMh6 fECjFSBcbgdYI7sEB2DQ9Fzb3cjF3sYshXWL17sjNg6wbCvcPscso4sKsBe0Mx+hJRJDeJ tGpFgHSA10O+MNtUm9Wh+cYMgo9cuDE= X-MC-Unique: on9OfpdMNXaRmlQCc9kKDA-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:message-id:reply-to; bh=NSp74aW0LPlHnI4gB6AAeUT1xbp0j2K7e5mEhLbWUrU=; b=Qlruf6FqA5pfCmVdgCnfwW/iuInHpLmvxs3NiQc29jvfuQp/AY9wIcwgUPmBiVVC0c 5hhWhYcJuQeCeEHknTLGP23LugbHOyuhq+slRh1sgtdPd1avfWD7RVdZzw//vzid4PKH LTOLQgFlCKuWMSqn3BoRsLFoOXeZGyxxzdPVeye40NIN+XFuCW4e1slWZsFZ4xLP4Yjz YsDkHUtNn89aYanw5jjDLQRFtaVhDm5Ol1jO1kcj4V18da5PdGveF2ByOIuLlPck7UMX VgtFT+URCn++ABox7FGrZHowlp/Chhj9Uv/U4pg0rTqpbFB4gip7aoiEHrZA0r8k53ZL qZiw== X-Gm-Message-State: ACrzQf2xtJgYprYZoipuvD0uBXPZU4etabB4WCQHUJgHsYQjF8UtRgTt Yf5FI+MsDmnX0L17vUEjZktZeGPHZVBIQQrU0HBeJ69rHdaS7exbHjZWuLXh4UHbGeMxZudKMrF wTiWxfdtGhDkvX5TVmqj3DawhSQTZIIZMosjq09SEylm3BalxbopIOWWDbBC7yORqcuM= X-Received: by 2002:a17:907:9627:b0:78d:a7d8:9407 with SMTP id gb39-20020a170907962700b0078da7d89407mr17573083ejc.675.1665664701160; Thu, 13 Oct 2022 05:38:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5y+6HbEC3dGhYvJcLHOdncBP3iAY8djB86k3C1OETRi8BSrMVXBUSPOdjL3yINDgg7/DCSPg== X-Received: by 2002:a17:907:9627:b0:78d:a7d8:9407 with SMTP id gb39-20020a170907962700b0078da7d89407mr17573064ejc.675.1665664700824; Thu, 13 Oct 2022 05:38:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 23/24] vmdk: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:10 +0200 Message-Id: <20221013123711.620631-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665667862593100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/vmdk.c | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index c720376aa5..2802501466 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1441,16 +1441,16 @@ static int coroutine_fn get_whole_cluster(BlockDriv= erState *bs, if (copy_from_backing) { /* qcow2 emits this on bs->file instead of bs->backing */ BLKDBG_EVENT(extent->file, BLKDBG_COW_READ); - ret =3D bdrv_pread(bs->backing, offset, skip_start_bytes, - whole_grain, 0); + ret =3D bdrv_co_pread(bs->backing, offset, skip_start_bytes, + whole_grain, 0); if (ret < 0) { ret =3D VMDK_ERROR; goto exit; } } BLKDBG_EVENT(extent->file, BLKDBG_COW_WRITE); - ret =3D bdrv_pwrite(extent->file, cluster_offset, skip_start_bytes, - whole_grain, 0); + ret =3D bdrv_co_pwrite(extent->file, cluster_offset, skip_start_by= tes, + whole_grain, 0); if (ret < 0) { ret =3D VMDK_ERROR; goto exit; @@ -1461,18 +1461,18 @@ static int coroutine_fn get_whole_cluster(BlockDriv= erState *bs, if (copy_from_backing) { /* qcow2 emits this on bs->file instead of bs->backing */ BLKDBG_EVENT(extent->file, BLKDBG_COW_READ); - ret =3D bdrv_pread(bs->backing, offset + skip_end_bytes, - cluster_bytes - skip_end_bytes, - whole_grain + skip_end_bytes, 0); + ret =3D bdrv_co_pread(bs->backing, offset + skip_end_bytes, + cluster_bytes - skip_end_bytes, + whole_grain + skip_end_bytes, 0); if (ret < 0) { ret =3D VMDK_ERROR; goto exit; } } BLKDBG_EVENT(extent->file, BLKDBG_COW_WRITE); - ret =3D bdrv_pwrite(extent->file, cluster_offset + skip_end_bytes, - cluster_bytes - skip_end_bytes, - whole_grain + skip_end_bytes, 0); + ret =3D bdrv_co_pwrite(extent->file, cluster_offset + skip_end_byt= es, + cluster_bytes - skip_end_bytes, + whole_grain + skip_end_bytes, 0); if (ret < 0) { ret =3D VMDK_ERROR; goto exit; @@ -1491,23 +1491,23 @@ static int coroutine_fn vmdk_L2update(VmdkExtent *e= xtent, VmdkMetaData *m_data, offset =3D cpu_to_le32(offset); /* update L2 table */ BLKDBG_EVENT(extent->file, BLKDBG_L2_UPDATE); - if (bdrv_pwrite(extent->file, - ((int64_t)m_data->l2_offset * 512) - + (m_data->l2_index * sizeof(offset)), - sizeof(offset), &offset, 0) < 0) { + if (bdrv_co_pwrite(extent->file, + ((int64_t)m_data->l2_offset * 512) + + (m_data->l2_index * sizeof(offset)), + sizeof(offset), &offset, 0) < 0) { return VMDK_ERROR; } /* update backup L2 table */ if (extent->l1_backup_table_offset !=3D 0) { m_data->l2_offset =3D extent->l1_backup_table[m_data->l1_index]; - if (bdrv_pwrite(extent->file, - ((int64_t)m_data->l2_offset * 512) - + (m_data->l2_index * sizeof(offset)), - sizeof(offset), &offset, 0) < 0) { + if (bdrv_co_pwrite(extent->file, + ((int64_t)m_data->l2_offset * 512) + + (m_data->l2_index * sizeof(offset)), + sizeof(offset), &offset, 0) < 0) { return VMDK_ERROR; } } - if (bdrv_flush(extent->file->bs) < 0) { + if (bdrv_co_flush(extent->file->bs) < 0) { return VMDK_ERROR; } if (m_data->l2_cache_entry) { @@ -1624,12 +1624,11 @@ static int coroutine_fn get_cluster_offset(BlockDri= verState *bs, } l2_table =3D (char *)extent->l2_cache + (min_index * l2_size_bytes); BLKDBG_EVENT(extent->file, BLKDBG_L2_LOAD); - if (bdrv_pread(extent->file, + if (bdrv_co_pread(extent->file, (int64_t)l2_offset * 512, l2_size_bytes, - l2_table, - 0 - ) < 0) { + l2_table, 0 + ) !=3D l2_size_bytes) { return VMDK_ERROR; } =20 @@ -1899,7 +1898,8 @@ vmdk_read_extent(VmdkExtent *extent, int64_t cluster_= offset, cluster_buf =3D g_malloc(buf_bytes); uncomp_buf =3D g_malloc(cluster_bytes); BLKDBG_EVENT(extent->file, BLKDBG_READ_COMPRESSED); - ret =3D bdrv_pread(extent->file, cluster_offset, buf_bytes, cluster_bu= f, 0); + ret =3D bdrv_co_pread(extent->file, cluster_offset, buf_bytes, cluster= _buf, + 0); if (ret < 0) { goto out; } @@ -2144,8 +2144,8 @@ vmdk_co_pwritev_compressed(BlockDriverState *bs, int6= 4_t offset, int64_t bytes, return length; } length =3D QEMU_ALIGN_UP(length, BDRV_SECTOR_SIZE); - ret =3D bdrv_truncate(s->extents[i].file, length, false, - PREALLOC_MODE_OFF, 0, NULL); + ret =3D bdrv_co_truncate(s->extents[i].file, length, false, + PREALLOC_MODE_OFF, 0, NULL); if (ret < 0) { return ret; } @@ -2586,7 +2586,7 @@ static int coroutine_fn vmdk_co_do_create(int64_t siz= e, desc_offset =3D 0x200; } =20 - ret =3D blk_pwrite(blk, desc_offset, desc_len, desc, 0); + ret =3D blk_co_pwrite(blk, desc_offset, desc_len, desc, 0); if (ret < 0) { error_setg_errno(errp, -ret, "Could not write description"); goto exit; @@ -2594,7 +2594,7 @@ static int coroutine_fn vmdk_co_do_create(int64_t siz= e, /* bdrv_pwrite write padding zeros to align to sector, we don't need t= hat * for description file */ if (desc_offset =3D=3D 0) { - ret =3D blk_truncate(blk, desc_len, false, PREALLOC_MODE_OFF, 0, e= rrp); + ret =3D blk_co_truncate(blk, desc_len, false, PREALLOC_MODE_OFF, 0= , errp); if (ret < 0) { goto exit; } --=20 2.37.3 From nobody Mon Feb 9 19:11:43 2026 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=1665669136; cv=none; d=zohomail.com; s=zohoarc; b=nYbeJNZkm20YMs1H/du+m3O2KW+MtRJVQIWHxVtpqWUY5DnuZrRQDP/xuddEhaDBZhluL/auSNm3P+gxUaAsPetGLulmM8upTmr8aha6PX0QPdai+n//EtPrnTLRFekewbsBz46IDRVjM+3BkYrkHNGTBaNANxMJCTtDXZzLXLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665669136; 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=mqlguSef8a2F2SdhBV7Q1/fhDKRm1B4phyAmEQsD8C4=; b=PUjJ5wSpKzhNC5G0PLtGlJzmV/mhbj6YiYAfjzGxFS9xiQqut/Y9uucgwEUxrz16WSzfYm95Ku9utouxgu3ESO+mr97E7KHN8R8auIIdBr7UjKkTqJPvGyJfHGKJPmevJ9XO0IuV+vtzuQXeazi8Hecx1PtHwFWVI/wm9eoQPo8= 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 166566913602671.93727713907992; Thu, 13 Oct 2022 06:52:16 -0700 (PDT) Received: from localhost ([::1]:53954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiy6s-0001W1-2p for importer@patchew.org; Thu, 13 Oct 2022 09:18:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixUD-0001px-GU for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oixU9-0004I8-8g for qemu-devel@nongnu.org; Thu, 13 Oct 2022 08:38:51 -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-296-nYhC8XFONqSuuNPfcSK39Q-1; Thu, 13 Oct 2022 08:38:25 -0400 Received: by mail-ed1-f71.google.com with SMTP id j20-20020a05640211d400b0045bd72f05d6so1426197edw.11 for ; Thu, 13 Oct 2022 05:38:25 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id lh9-20020a170906f8c900b0078d793e7927sm3051462ejb.4.2022.10.13.05.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 05:38:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665664706; 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=mqlguSef8a2F2SdhBV7Q1/fhDKRm1B4phyAmEQsD8C4=; b=ATsrVj6JxW2bR4hvWtlqpDzj1lYIF8ZPQXXlJMmSdkKTf0Xeq6sWFe90xZAaAdG8zcdTAR nHgBmQ7vUHmA2K0wLeR/7Nox3fxSoLpDzG3kfj/wiJ4fzcRsKX+whddGz27UX6yGfMfihF QUGE9xjIsbQoPEacmYMhDBZ6XMb90DI= X-MC-Unique: nYhC8XFONqSuuNPfcSK39Q-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:message-id:reply-to; bh=mqlguSef8a2F2SdhBV7Q1/fhDKRm1B4phyAmEQsD8C4=; b=YA+KPu/Tp+XA9xn2DqMS+tzGXCAx01LpJlV/xEBXPOjZ4iE54UMLki71teyPjMTB8O dA8ltbpziutD6Nd/xPJ/U1KvdohL+mL3kzFzGjvmA2HOkXHoevKyy0jpIqclN7+A64NX kIZ7z828Gq5xG0jlG61/7u8f9wbloObzcddG1/WZpLIxM1b1vmn3O6802f+jhySUFtFB ZwHDAnrg+RP8MponhHYsVNOrlgqEZvr7BmZyn/Exg2SlUTcAh3yBAyZn918bEiHCXRwk NR5lpC0ljw9+NDrYn2oMBzVzilJZeMyTZBixTtZIKpXWye3kc8oMNg+WxAp42pPICC3K HjsQ== X-Gm-Message-State: ACrzQf1xflbdtPER5iV/QVZowE03/1gfhC7SpQMe0vHS6DLJoaeoR1kv nplqDdvtmNHHh+k0tIfmPeenRaYLziYfTPXcME/jyT8XG4yrVwJVVmzH4dlGPUtAo3B+L8gWls8 XfeHitR9amEirMcLXLAjj82iNw3kDAPa4w8kJ0zCXoYiowJNPcL8IA4X5yTOm9vozONY= X-Received: by 2002:a05:6402:169a:b0:458:fe61:d3b4 with SMTP id a26-20020a056402169a00b00458fe61d3b4mr31328246edv.140.1665664703941; Thu, 13 Oct 2022 05:38:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xNihb/1uwA26brng7RXBzusBRJJtpdq5L95jCfY/KB7hdaGP9NGu1ZrcLVuM8CaCmaTgzMQ== X-Received: by 2002:a05:6402:169a:b0:458:fe61:d3b4 with SMTP id a26-20020a056402169a00b00458fe61d3b4mr31328227edv.140.1665664703664; Thu, 13 Oct 2022 05:38:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, afaria@redhat.com Subject: [PATCH 24/24] monitor: switch to *_co_* functions Date: Thu, 13 Oct 2022 14:37:11 +0200 Message-Id: <20221013123711.620631-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013123711.620631-1-pbonzini@redhat.com> References: <20221013123711.620631-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: 1665669141851100001 Content-Type: text/plain; charset="utf-8" From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index a32bafc07a..47d47d5b18 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2448,7 +2448,7 @@ void coroutine_fn qmp_block_resize(bool has_device, c= onst char *device, bdrv_co_unlock(bs); =20 old_ctx =3D bdrv_co_enter(bs); - blk_truncate(blk, size, false, PREALLOC_MODE_OFF, 0, errp); + blk_co_truncate(blk, size, false, PREALLOC_MODE_OFF, 0, errp); bdrv_co_leave(bs, old_ctx); =20 bdrv_co_lock(bs); --=20 2.37.3