From nobody Tue Sep 9 03:16:12 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=1747323154; cv=none; d=zohomail.com; s=zohoarc; b=SswxIQuOM7Y8CnwljRWdZrmvUD3dtABC7QP/ZpBcKhJXwYMvY2Fwxvlg8Ulj7qZ+jHs3IUgOvpQQ3Fls7mgyKsJLppgiCn4P9t+WCXQbyUf+obWKbYbwXvIiOmzzVcHoKBnL0KEOM3+UjX6D0wKNat/qhqWO6zP8FNP+uC3Sejs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747323154; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=2PjGi2VTuXg6qPO1gtI3Oq+xf1Oo/BSAfqoDWKdFhrg=; b=QE8zG8Ec4abuxVzgT4a8ZzRjdXaPRVa6R4nVykM4HkIKXpIaIyt+r72iGwh0RRm/CHrxew0GnZ2x8PykWuZnNgv5DlVIaDP08TVs4nDpPPVniRIhUbY7CGxoov43h9rDdgfhwEKQGNfoJFMQ8s/kFLyahGMmpjH1tBkavJORq0s= 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 1747323154468576.4154529010376; Thu, 15 May 2025 08:32:34 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7EB4F150B; Thu, 15 May 2025 11:32:33 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A7D461428; Thu, 15 May 2025 11:29:47 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 33CB81366; Thu, 15 May 2025 11:29:40 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 81D3D1301 for ; Thu, 15 May 2025 11:29:26 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-416-iYH7zEUPPcqGYFnpfhBFEQ-1; Thu, 15 May 2025 11:29:25 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3D4B3195608B for ; Thu, 15 May 2025 15:29:24 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.37]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3D003180045B; Thu, 15 May 2025 15:29:23 +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=1747322966; 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=sGECi6RHgUNK36IzGIEWVeIQZDDZFmz8EF0cp3G1pes=; b=RDGaSGPh9wH1L40eJ96sQWek7+TorbzewZVI+AKQQao4x2cdOKwhW1q+2n0eY+7T7+H26v 0TH1e3E0AkfuJaKwKhTYWfrZgad8US7NNQvirypfdiW70EymMF99xdAKlQ1NUmi/3M/8E7 RuS8zmQhUidZ1XpVcTqAUZo6dc582MU= X-MC-Unique: iYH7zEUPPcqGYFnpfhBFEQ-1 X-Mimecast-MFC-AGG-ID: iYH7zEUPPcqGYFnpfhBFEQ_1747322964 To: devel@lists.libvirt.org Subject: [PATCH 08/17] qemuProcessStartWithMemoryState: Rename 'snapshot' to 'internalSnapshotRevert' Date: Thu, 15 May 2025 17:28:53 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: uHz37HVJn263syocMisOz6lRHLOC1x7tWC-PpXT33Ho_1747322964 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: HQOQ43QO5HAZONQ6F364VJWSSKOZNQRP X-Message-ID-Hash: HQOQ43QO5HAZONQ6F364VJWSSKOZNQRP X-MailFrom: pkrempa@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 CC: Peter Krempa 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: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1747323156645116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Make it obvious that the variable is used for internal snapshot reversion by renaming it. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f5543542d5..bed517184f 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8580,7 +8580,7 @@ qemuProcessStart(virConnectPtr conn, * @vm: domain object * @fd: FD pointer of memory state file * @path: path to memory state file - * @snapshot: internal snapshot to load when starting QEMU process or NULL + * @internalSnapshotRevert: internal snapshot to load when starting QEMU p= rocess or NULL * @data: data from memory state file or NULL * @migParams: Migration params to use on restore or NULL * @asyncJob: type of asynchronous job @@ -8591,11 +8591,11 @@ qemuProcessStart(virConnectPtr conn, * Start VM with existing memory state. Make sure that the stored memory s= tate * is correctly decompressed so it can be loaded by QEMU process. * - * When reverting to internal snapshot caller needs to pass @snapshot + * When reverting to internal snapshot caller needs to pass @internalSnaps= hotRevert * to correctly start QEMU process, @fd, @path, @data needs to be NULL. * * When restoring VM from saved image caller needs to pass @fd, @path and - * @data to correctly start QEMU process, @snapshot needs to be NULL. + * @data to correctly start QEMU process, @internalSnapshotRevert needs to= be NULL. * * For audit purposes the expected @reason is one of `restored` or `from-s= napshot`. * @@ -8607,7 +8607,7 @@ qemuProcessStartWithMemoryState(virConnectPtr conn, virDomainObj *vm, int *fd, const char *path, - virDomainMomentObj *snapshot, + virDomainMomentObj *internalSnapshotRevert, virQEMUSaveData *data, qemuMigrationParams *migParams, virDomainAsyncJob asyncJob, @@ -8638,7 +8638,7 @@ qemuProcessStartWithMemoryState(virConnectPtr conn, /* The fd passed to qemuProcessIncomingDefNew is used to create the mi= gration * URI, so it must be called after starting the decompression program. */ - if (!snapshot) { + if (!internalSnapshotRevert) { /* Internal snapshots are reverted by a QMP command after qemu is = started, * so we don't actually want to setup incoming migration. */ if (!(incoming =3D qemuProcessIncomingDefNew(driver, vm, NULL, "st= dio", @@ -8656,7 +8656,7 @@ qemuProcessStartWithMemoryState(virConnectPtr conn, priv->disableSlirp =3D true; if (qemuProcessStart(conn, driver, vm, cookie ? cookie->cpu : NULL, - asyncJob, incoming, *fd, path, snapshot, + asyncJob, incoming, *fd, path, internalSnapshotRe= vert, migParams, VIR_NETDEV_VPORT_PROFILE_OP_RESTORE, start_flags) =3D=3D 0) *started =3D true; --=20 2.49.0