From nobody Mon Feb 9 03:52:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1633681172; cv=none; d=zohomail.com; s=zohoarc; b=Tp2fsnLv7MyirUufiA7bn9SrP+2w4fHgGB3oEBIwDAZZBMqLfiRz/DMUmV3mDAy3A3YFQ7EtqFSGFUM8CODJiPKONv2+CSzztn0tBFpVVtfUx2NNZ5PSYUOhVvayLfcjoqumm5pF1FpSNw8qb2lxY5NNI9BHUEfWUT1GAXVfGUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633681172; h=Content-Type:Content-Transfer-Encoding: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=g6jpbJQ+n8tXKA/a4a5uUoFaP/HxwdATn6wn5WiVNT0=; b=haktEy/GGaLqd7DJFloId/O4gdwIJ/GF6pNpdFyeXC2XSMZHm42P/lAxqmNlAX5GlkVR0Sb2AVNKii8f43eBB8nh/HCELQFVoytKh7xDRbCFDQTC056syXtsigaumapUAAPxUlWY+f2QqDCx5J0XZVlsmqXfW1wC+ziOUrUZA64= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633681172634895.8580358930319; Fri, 8 Oct 2021 01:19:32 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-499-Y4DbmZVWNwCktp_2jtIXKg-1; Fri, 08 Oct 2021 04:19:30 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 20B6C835DEB; Fri, 8 Oct 2021 08:19:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0432C5F4EA; Fri, 8 Oct 2021 08:19:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B835D4E58E; Fri, 8 Oct 2021 08:19:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1988JM9R030157 for ; Fri, 8 Oct 2021 04:19:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id E157C10016FF; Fri, 8 Oct 2021 08:19:22 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C09710016F5 for ; Fri, 8 Oct 2021 08:19:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633681171; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=g6jpbJQ+n8tXKA/a4a5uUoFaP/HxwdATn6wn5WiVNT0=; b=UrFibkQoEPGwlffZi6Cjw5n4b+Tkp4R5TNsFTa7Mw2UWz7QJkjIJ9OYW9vOQCsR6XG9YJj VRXszAwt85g0jqc6Qf1NQAWEisgTQTbnsA3amz6sUqPjDk1sDxcaxRWKU+N9Zujoy8abUH WWG7wmrCO1AkerwPe0JSUtcgBZbsgQs= X-MC-Unique: Y4DbmZVWNwCktp_2jtIXKg-1 From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 2/2] qemu_migration: drop unnecessary 'migrate_speed' variable Date: Fri, 8 Oct 2021 10:19:05 +0200 Message-Id: <8ec9b82b0603e161e1e2166330d0d92545f521d8.1633680885.git.khanicov@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633681173725100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Kristina Hanicova Reviewed-by: Jiri Denemark --- src/qemu/qemu_migration.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 71edcd5c62..48df080c15 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -4012,7 +4012,6 @@ qemuMigrationSrcRun(virQEMUDriver *driver, g_autofree char *tlsAlias =3D NULL; qemuMigrationIOThread *iothread =3D NULL; VIR_AUTOCLOSE fd =3D -1; - unsigned long migrate_speed =3D resource ? resource : priv->migMaxBand= width; unsigned long restore_max_bandwidth =3D priv->migMaxBandwidth; virErrorPtr orig_err =3D NULL; unsigned int cookieFlags =3D 0; @@ -4026,7 +4025,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, g_autofree char *timestamp =3D NULL; int rc; =20 - priv->migMaxBandwidth =3D migrate_speed; + priv->migMaxBandwidth =3D resource ? resource : priv->migMaxBandwidth; =20 VIR_DEBUG("driver=3D%p, vm=3D%p, cookiein=3D%s, cookieinlen=3D%d, " "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%lx, resource= =3D%lu, " @@ -4119,7 +4118,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, =20 if (bwParam && qemuMigrationParamsSetULL(migParams, QEMU_MIGRATION_PARAM_MAX_BAND= WIDTH, - migrate_speed * 1024 * 1024) < 0) + priv->migMaxBandwidth * 1024 * 1024) < 0) goto error; =20 if (qemuMigrationParamsApply(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT, @@ -4149,7 +4148,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, =20 if (qemuMigrationSrcNBDStorageCopy(driver, vm, mig, host, - migrate_speed, + priv->migMaxBandwidth, nmigrate_disks, migrate_disks, dconn, tlsAlias, @@ -4197,7 +4196,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, } =20 if (!bwParam && - qemuMonitorSetMigrationSpeed(priv->mon, migrate_speed) < 0) + qemuMonitorSetMigrationSpeed(priv->mon, priv->migMaxBandwidth) < 0) goto exit_monitor; =20 /* connect to the destination qemu if needed */ --=20 2.31.1