From nobody Tue Sep 9 03:20:43 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1749126077; cv=none; d=zohomail.com; s=zohoarc; b=OxwKH5dOZmMl0xpu7L/libxOZMHfzQw2+INRZLQHFL5kXoJuRWIsel1t4Pjw6JiikuU+ysQ7hvR3vkOYQipKB1wAT+FmPyhfERG+HLHb4sz7WEcgHypT3qxHDQo+V+npAdiOZOR2p8LfbwFLZ4ddCSEFe0/8NvahMPVQgD41Moo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749126077; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=WtAtEMUGqjBe9lqwKdsFCrix8cmytOcN1v2hpS1ntRI=; b=lCFFOm8lYyKuV+7ysR2zthpBYHdv1AIPYyDGE0Pf4J7jfkarvp3AKUHEey0n1UDk3uIcjosaJ2wv94v7bZLNEgSv/1PToP7FeaDAAltQYPZ+EJ1t5rdWub6bamQTErEZIYyGGL73OUaa2yHQx8X9SS67nYI9You8Cel17dpxuRY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1749126077209528.9546218169024; Thu, 5 Jun 2025 05:21:17 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 32B54D61; Thu, 5 Jun 2025 08:21:16 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 38D141542; Thu, 5 Jun 2025 08:16:46 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 21C64148B; Thu, 5 Jun 2025 08:16:40 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8FA6C11EC for ; Thu, 5 Jun 2025 08:16:24 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-691-xoeXV5K-PvOruJCyFbfVow-1; Thu, 05 Jun 2025 08:16:22 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E492B1800378 for ; Thu, 5 Jun 2025 12:16:21 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3A45A1956087 for ; Thu, 5 Jun 2025 12:16:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749125784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pkZiDxGSJ6RqcgMfu/EF0866WZ9ubpqLPf/kMKA8KBo=; b=LDzsh8RZkFaPPpNaP8cR9fSP6FsAoO01DfoAWO1ZA/l7vxQYKBlGrfJFhWjvmvaoJNxfGC mofCziIms2ZhMUqI4MEosFNXiul7R3EI+wbsy2T+ZBkeEV1izaK4JZyCB8fkMt4tgoemEY 76SaTAlyh6VJ75hNNW8V//7W9PZJd6g= X-MC-Unique: xoeXV5K-PvOruJCyFbfVow-1 X-Mimecast-MFC-AGG-ID: xoeXV5K-PvOruJCyFbfVow_1749125782 To: devel@lists.libvirt.org Subject: [PATCH 09/10] qemu: Finish argument rename Date: Thu, 5 Jun 2025 14:16:06 +0200 Message-ID: <3978182958448d3be16cbebc64d59ba131c1e763.1749125656.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7_j3ktejouJbCN1KJFbKgyFdyduJR0gFELdoJ-GLvo8_1749125782 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JG3X7LLZWS2JO5IGHKVLMTBWCBO6STFJ X-Message-ID-Hash: JG3X7LLZWS2JO5IGHKVLMTBWCBO6STFJ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1749126079191116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik There are still some functions around migration code that use 'resource' instead 'bandwidth'. Rename the variable/argument inside them. Signed-off-by: Michal Privoznik --- src/qemu/qemu_migration.c | 60 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 38ffcdf428..c8974dbc5b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -4897,7 +4897,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, char **cookieout, int *cookieoutlen, unsigned int flags, - unsigned long resource, + unsigned long bandwidth, qemuMigrationSpec *spec, virConnectPtr dconn, const char *graphicsuri, @@ -4922,15 +4922,15 @@ qemuMigrationSrcRun(virQEMUDriver *driver, g_autoptr(virDomainDef) persistDef =3D NULL; int rc; =20 - if (resource > 0) - priv->migMaxBandwidth =3D resource; + if (bandwidth > 0) + priv->migMaxBandwidth =3D bandwidth; =20 VIR_DEBUG("driver=3D%p, vm=3D%p, cookiein=3D%s, cookieinlen=3D%d, " - "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, resource= =3D%lu, " + "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, bandwidth= =3D%lu, " "spec=3D%p (dest=3D%d, fwd=3D%d), dconn=3D%p, graphicsuri=3D= %s, " "migrate_disks=3D%p, migrate_disks_detect_zeroes=3D%p", driver, vm, NULLSTR(cookiein), cookieinlen, - cookieout, cookieoutlen, flags, resource, + cookieout, cookieoutlen, flags, bandwidth, spec, spec->destType, spec->fwdType, dconn, NULLSTR(graphicsuri), migrate_disks, migrate_disks_detect_ze= roes); =20 @@ -5322,7 +5322,7 @@ qemuMigrationSrcPerformNative(virQEMUDriver *driver, char **cookieout, int *cookieoutlen, unsigned int flags, - unsigned long resource, + unsigned long bandwidth, virConnectPtr dconn, const char *graphicsuri, const char **migrate_disks, @@ -5336,10 +5336,10 @@ qemuMigrationSrcPerformNative(virQEMUDriver *driver, qemuMigrationSpec spec; =20 VIR_DEBUG("driver=3D%p, vm=3D%p, uri=3D%s, cookiein=3D%s, cookieinlen= =3D%d, " - "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, resource= =3D%lu, " + "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, bandwidth= =3D%lu, " "graphicsuri=3D%s, migrate_disks=3D%p, migrate_disks_detect_= zeroes=3D%p", driver, vm, uri, NULLSTR(cookiein), cookieinlen, - cookieout, cookieoutlen, flags, resource, + cookieout, cookieoutlen, flags, bandwidth, NULLSTR(graphicsuri), migrate_disks, migrate_disks_detect_ze= roes); =20 if (!(uribits =3D qemuMigrationAnyParseURI(uri, NULL))) @@ -5404,7 +5404,7 @@ qemuMigrationSrcPerformNative(virQEMUDriver *driver, cookieout, cookieoutlen, &spec, dconn= , flags); } else { ret =3D qemuMigrationSrcRun(driver, vm, persist_xml, cookiein, coo= kieinlen, - cookieout, cookieoutlen, flags, resource, + cookieout, cookieoutlen, flags, bandwidt= h, &spec, dconn, graphicsuri, migrate_disks, migrate_disks_detect_zero= es, migParams, nbdURI); @@ -5427,7 +5427,7 @@ qemuMigrationSrcPerformTunnel(virQEMUDriver *driver, char **cookieout, int *cookieoutlen, unsigned int flags, - unsigned long resource, + unsigned long bandwidth, virConnectPtr dconn, const char *graphicsuri, const char **migrate_disks, @@ -5438,10 +5438,10 @@ qemuMigrationSrcPerformTunnel(virQEMUDriver *driver, int fds[2] =3D { -1, -1 }; =20 VIR_DEBUG("driver=3D%p, vm=3D%p, st=3D%p, cookiein=3D%s, cookieinlen= =3D%d, " - "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, resource= =3D%lu, " + "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, bandwidth= =3D%lu, " "graphicsuri=3D%s, migrate_disks=3D%p", driver, vm, st, NULLSTR(cookiein), cookieinlen, - cookieout, cookieoutlen, flags, resource, + cookieout, cookieoutlen, flags, bandwidth, NULLSTR(graphicsuri), migrate_disks); =20 spec.fwdType =3D MIGRATION_FWD_STREAM; @@ -5469,7 +5469,7 @@ qemuMigrationSrcPerformTunnel(virQEMUDriver *driver, /* Migration with NBD is not supported with _TUNNELLED, thus * 'migrate_disks_detect_zeroes' is NULL here */ ret =3D qemuMigrationSrcRun(driver, vm, persist_xml, cookiein, cookiei= nlen, - cookieout, cookieoutlen, flags, resource, &s= pec, + cookieout, cookieoutlen, flags, bandwidth, &= spec, dconn, graphicsuri, migrate_disks, NULL, migParams, NULL); =20 @@ -5534,7 +5534,7 @@ qemuMigrationSrcPerformPeer2Peer2(virQEMUDriver *driv= er, const char *dconnuri, unsigned int flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, qemuMigrationParams *migParams) { virDomainPtr ddomain =3D NULL; @@ -5548,9 +5548,9 @@ qemuMigrationSrcPerformPeer2Peer2(virQEMUDriver *driv= er, unsigned long destflags; =20 VIR_DEBUG("driver=3D%p, sconn=3D%p, dconn=3D%p, vm=3D%p, dconnuri=3D%s= , " - "flags=3D0x%x, dname=3D%s, resource=3D%lu", + "flags=3D0x%x, dname=3D%s, bandwidth=3D%lu", driver, sconn, dconn, vm, NULLSTR(dconnuri), - flags, NULLSTR(dname), resource); + flags, NULLSTR(dname), bandwidth); =20 /* In version 2 of the protocol, the prepare step is slightly * different. We fetch the domain XML of the source domain @@ -5579,14 +5579,14 @@ qemuMigrationSrcPerformPeer2Peer2(virQEMUDriver *dr= iver, =20 qemuDomainObjEnterRemote(vm); ret =3D dconn->driver->domainMigratePrepareTunnel - (dconn, st, destflags, dname, resource, dom_xml); + (dconn, st, destflags, dname, bandwidth, dom_xml); if (qemuDomainObjExitRemote(vm, true) < 0) goto cleanup; } else { qemuDomainObjEnterRemote(vm); ret =3D dconn->driver->domainMigratePrepare2 (dconn, &cookie, &cookielen, NULL, &uri_out, - destflags, dname, resource, dom_xml); + destflags, dname, bandwidth, dom_xml); if (qemuDomainObjExitRemote(vm, true) < 0) goto cleanup; } @@ -5611,13 +5611,13 @@ qemuMigrationSrcPerformPeer2Peer2(virQEMUDriver *dr= iver, if (flags & VIR_MIGRATE_TUNNELLED) ret =3D qemuMigrationSrcPerformTunnel(driver, vm, st, NULL, NULL, 0, NULL, NULL, - flags, resource, dconn, + flags, bandwidth, dconn, NULL, NULL, migParams); else ret =3D qemuMigrationSrcPerformNative(driver, vm, NULL, uri_out, cookie, cookielen, NULL, NULL, /* No out cookie w= ith v2 migration */ - flags, resource, dconn, NULL, = NULL, + flags, bandwidth, dconn, NULL,= NULL, NULL, migParams, NULL); =20 /* Perform failed. Make sure Finish doesn't overwrite the error */ @@ -6075,7 +6075,7 @@ qemuMigrationSrcPerformPeer2Peer(virQEMUDriver *drive= r, qemuMigrationParams *migParams, unsigned int flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, bool *v3proto) { int ret =3D -1; @@ -6091,11 +6091,11 @@ qemuMigrationSrcPerformPeer2Peer(virQEMUDriver *dri= ver, VIR_DEBUG("driver=3D%p, sconn=3D%p, vm=3D%p, xmlin=3D%s, dconnuri=3D%s= , uri=3D%s, " "graphicsuri=3D%s, listenAddress=3D%s, " "migrate_disks=3D%p, nbdPort=3D%d, nbdURI=3D%s, flags=3D0x%x= , " - "dname=3D%s, resource=3D%lu", + "dname=3D%s, bandwidth=3D%lu", driver, sconn, vm, NULLSTR(xmlin), NULLSTR(dconnuri), NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress), migrate_disks, nbdPort, NULLSTR(nbdURI), - flags, NULLSTR(dname), resource); + flags, NULLSTR(dname), bandwidth); =20 if (flags & VIR_MIGRATE_TUNNELLED && uri) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", @@ -6195,11 +6195,11 @@ qemuMigrationSrcPerformPeer2Peer(virQEMUDriver *dri= ver, ret =3D qemuMigrationSrcPerformPeer2Peer3(driver, sconn, dconn, dc= onnuri, vm, xmlin, persist_xml, dname, uri, g= raphicsuri, listenAddress, migrate_dis= ks, migrate_disks_detect_zeroes, - nbdPort, nbdURI, migParams= , resource, + nbdPort, nbdURI, migParams= , bandwidth, !!useParams, flags); } else { ret =3D qemuMigrationSrcPerformPeer2Peer2(driver, sconn, dconn, vm, - dconnuri, flags, dname, re= source, + dconnuri, flags, dname, ba= ndwidth, migParams); } =20 @@ -6241,7 +6241,7 @@ qemuMigrationSrcPerformJob(virQEMUDriver *driver, int *cookieoutlen, unsigned int flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, bool v3proto) { virObjectEvent *event =3D NULL; @@ -6283,7 +6283,7 @@ qemuMigrationSrcPerformJob(virQEMUDriver *driver, dconnuri, uri, graphicsuri,= listenAddress, migrate_disks, migrate_disk= s_detect_zeroes, nbdPort, nbdURI, - migParams, flags, dname, re= source, + migParams, flags, dname, ba= ndwidth, &v3proto); } else { if (qemuMigrationJobStartPhase(vm, QEMU_MIGRATION_PHASE_PERFORM2) = < 0) @@ -6291,7 +6291,7 @@ qemuMigrationSrcPerformJob(virQEMUDriver *driver, =20 ret =3D qemuMigrationSrcPerformNative(driver, vm, persist_xml, uri= , cookiein, cookieinlen, cookieout, cookieoutlen, - flags, resource, NULL, NULL, N= ULL, NULL, + flags, bandwidth, NULL, NULL, = NULL, NULL, migParams, nbdURI); } if (ret < 0) @@ -6365,7 +6365,7 @@ qemuMigrationSrcPerformPhase(virQEMUDriver *driver, char **cookieout, int *cookieoutlen, unsigned int flags, - unsigned long resource, + unsigned long bandwidth, const char *nbdURI) { qemuDomainObjPrivate *priv =3D vm->privateData; @@ -6393,7 +6393,7 @@ qemuMigrationSrcPerformPhase(virQEMUDriver *driver, =20 if (qemuMigrationSrcPerformNative(driver, vm, persist_xml, uri, cookie= in, cookieinlen, cookieout, cookieoutlen, - flags, resource, NULL, graphicsuri, + flags, bandwidth, NULL, graphicsuri, migrate_disks, migrate_disks_detect_= zeroes, migParams, nbdURI) < 0) goto cleanup; --=20 2.49.0