From nobody Sat Feb 7 03:04:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1688129913; cv=none; d=zohomail.com; s=zohoarc; b=lmifcPO9IG0hoD+BEeplRIDKzBphI5pYIil4sw72WqOTHA0sT/MqFnbB2TglJ+rb9nMsiAOWmo3LiJ0LeleguI2rmXrTt/wJQH1yLFoV+gkALmk9n2gAxZA8LojYjOoZWHBnI8vieo6XJWX+onS3WGH+HendmYnoMVzrD9y8r2A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688129913; 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=ODg1HxymuPwEfGuG4e3fzYGFJWzw0KQwca6jlR9C2nk=; b=TBpbVtMDQlOM83Zgx4VeWTRRmI4C4T5Tl3noWlTiGa7ThxLR3Vx1QNsETT1hxijNyI3lT9i0a6wBeNG+kwhSAXCix2xncMYMq0o8X8Z5WQsKf1VCztpnz0JPn0221g14269tFcIn60yFKDpgcBh72sQSgZYAJQNOuqcOMmSLnVQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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 [170.10.129.124]) by mx.zohomail.com with SMTPS id 168812991383033.59164165654386; Fri, 30 Jun 2023 05:58:33 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-235-VtjB7nwkMq-XltRokWIJKA-1; Fri, 30 Jun 2023 08:58:30 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5B04086F122; Fri, 30 Jun 2023 12:58:28 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4448C200A3AD; Fri, 30 Jun 2023 12:58:28 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D145C1946A4D; Fri, 30 Jun 2023 12:58:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AA0D819465B3 for ; Fri, 30 Jun 2023 12:28:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 98F9DF5CFE; Fri, 30 Jun 2023 12:28:50 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB4F2F5CED for ; Fri, 30 Jun 2023 12:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688129912; 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=ODg1HxymuPwEfGuG4e3fzYGFJWzw0KQwca6jlR9C2nk=; b=jVdpbGPIsH0RGpVozrTSFopD4ggfwhOCfj+x3qCAFRhbWDFFPETrDvpShrwodmXH0kBPgE mwTyo67zctbegZe8vekugtQKrtm13hwFxBxSoWZh6aXmVUA6b9Syj78XDIiI14Hh3tA0ga Kj7pYLjDbFojhQ3cE3ZSnTWGSeTZLII= X-MC-Unique: VtjB7nwkMq-XltRokWIJKA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] qemu: driver: Reformat helpers for saving VM state Date: Fri, 30 Jun 2023 14:28:46 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: 1688129914205100001 Content-Type: text/plain; charset="utf-8" Rewrap argument definition of qemuDomainSaveInternal and align argument in the invocation of the aforementioned function in qemuDomainManagedSaveHelper. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f20544590d..497923ffee 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2620,9 +2620,12 @@ qemuDomainGetControlInfo(virDomainPtr dom, */ static int qemuDomainSaveInternal(virQEMUDriver *driver, - virDomainObj *vm, const char *path, - int compressed, virCommand *compressor, - const char *xmlin, unsigned int flags) + virDomainObj *vm, + const char *path, + int compressed, + virCommand *compressor, + const char *xmlin, + unsigned int flags) { g_autofree char *xml =3D NULL; bool was_running =3D false; @@ -2785,7 +2788,7 @@ qemuDomainManagedSaveHelper(virQEMUDriver *driver, VIR_INFO("Saving state of domain '%s' to '%s'", vm->def->name, path); if (qemuDomainSaveInternal(driver, vm, path, compressed, - compressor, dxml, flags) < 0) + compressor, dxml, flags) < 0) return -1; vm->hasManagedSave =3D true; --=20 2.41.0 From nobody Sat Feb 7 03:04:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1688128454; cv=none; d=zohomail.com; s=zohoarc; b=QquSgryqK2eOdbLNC/XXoeBXm8qRyjZLIIveonsd0Eqyp/fi6xw7Va6GtWA2BhvgJlEVH42VwETr1S8suBpyZsbPXnwq3G2y1JnRmhJM19SQ5yc+deNrpc9bmg7/+eovTaI3B89V0+Bpa1k0UdExYz1TRrzOWaC3nLZUU6C8FFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688128454; 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=JRT7uj6hi4c+7poeNxIXRUVVC0JqpT0R0Tww7lwCH7M=; b=g/IHK/JynW2/UQtsmOsdixfeXowZ168CQLtK+TFqJwgPUH/ywjtuVpMdVcIkzkgN6qpdEo3geilRKFlFPjEV59MaYiYrf2Xyd64ZwTN4lVsAkQY0WEJsvRJYg9v3Vrp6oaFAiJtJyQkdoRSHkcZLSUd4gQsyPI909/RKQJKKmlc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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 [170.10.129.124]) by mx.zohomail.com with SMTPS id 1688128454490641.1948604991932; Fri, 30 Jun 2023 05:34:14 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-115--zu3lrjAPb67_yTPKdnt8g-1; Fri, 30 Jun 2023 08:34:08 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1543687323D; Fri, 30 Jun 2023 12:34:06 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82199492C13; Fri, 30 Jun 2023 12:34:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5BDBE19465B6; Fri, 30 Jun 2023 12:34:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9B1BE19465B3 for ; Fri, 30 Jun 2023 12:28:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8BE06F5CEA; Fri, 30 Jun 2023 12:28:51 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE03AF5CFD for ; Fri, 30 Jun 2023 12:28:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688128453; 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=JRT7uj6hi4c+7poeNxIXRUVVC0JqpT0R0Tww7lwCH7M=; b=excB/iNlWris4rM9u8G4oqSBVvfhiLW3wb+5GCUbbGau8ZxqGvPGjVUtGnPYjqKIcJW/dT nFMdBolKryvuL8/txwSUvr94ntsCd93F3tLMOP9BABhP7XNOgBDMlt41s4z3fUO5X4znHS h5g3ffEs3IbkJpZwcBTajnAZdEwl06o= X-MC-Unique: -zu3lrjAPb67_yTPKdnt8g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/2] Properly mark auto-added 'terminator' virStorageSource Date: Fri, 30 Jun 2023 14:28:47 +0200 Message-ID: <372124651215760e826ef4c9bcc7b305dbef8ecd.1688128098.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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: 1688128456038100001 Content-Type: text/plain; charset="utf-8" All backing chain members which were auto-added by image detection, including the terminating element, should have the 'detected' property set to true. This is needed to properly strip the detected elements in some cases, e.g. for the status XML where we could treat some images as manually terminated even when it was auto-detected. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 4 +++- src/storage_file/storage_source.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 94587638c3..25d1a0cb1b 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7841,8 +7841,10 @@ qemuDomainDetermineDiskChain(virQEMUDriver *driver, disksrc->format < VIR_STORAGE_FILE_BACKING) { /* terminate the chain for such images as the code below would do = */ - if (!disksrc->backingStore) + if (!disksrc->backingStore) { disksrc->backingStore =3D virStorageSourceNew(); + disksrc->backingStore->detected =3D true; + } /* we assume that FD-passed disks always exist */ if (virStorageSourceIsFD(disksrc)) diff --git a/src/storage_file/storage_source.c b/src/storage_file/storage_s= ource.c index 47fc1edbd2..3c50239e29 100644 --- a/src/storage_file/storage_source.c +++ b/src/storage_file/storage_source.c @@ -1420,6 +1420,7 @@ virStorageSourceGetMetadataRecurse(virStorageSource *= src, } else { /* add terminator */ src->backingStore =3D virStorageSourceNew(); + src->backingStore->detected =3D true; } return 0; --=20 2.41.0