From nobody Fri Dec 12 14:07:30 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=1765273791; cv=none; d=zohomail.com; s=zohoarc; b=hwsj9bJCI2QlYYlam0SOgr6UDCDVp0mSvNv7qL4ZL0XAxlqlXPA2iiYX7tzqrUpsY53xQfzTqgJhgzbKN4lfTFsQnOrXsNyoOoe3dDGLKucjuBzi92Svix5p2aMHWI7KJWTgMmFZYX1HNPXSH6O/6U6yv2lloL9EzqzZKW2F6PQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765273791; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner: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=RMmck7RCwt29gzDUvyz5PWgtDLV3t/ZxgVPDPWHewz0=; b=A7Hwt1nm2LFvGKzazNweY+XaSMbatSdAjzxVmiTN6EaMcheNQ+tce3UbXQSSRWwDxF0acK75bZkk/zfrNJ1skb0Zq8MLQJmooi6Q8qJypdzN1VrfIWoXjXmQyy74jlUmiAKovMrrjywIx1RzNdJiujzYZfgiUMuNt164gi0wHw0= 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 1765273791772874.0762787929218; Tue, 9 Dec 2025 01:49:51 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 9DF054415E; Tue, 9 Dec 2025 04:49:16 -0500 (EST) Received: from [172.19.199.80] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 8522943DCC; Tue, 9 Dec 2025 04:46:57 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id F0C4941A42; Tue, 9 Dec 2025 04:46:18 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 214FC41A1C for ; Tue, 9 Dec 2025 04:46:18 -0500 (EST) Received: from mx-prod-mc-01.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-651-STIYrSZhNuq7vdE_jr-4Jg-1; Tue, 09 Dec 2025 04:46:15 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2912119560AD for ; Tue, 9 Dec 2025 09:46:15 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4D74F1956095 for ; Tue, 9 Dec 2025 09:46:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765273577; 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=RMmck7RCwt29gzDUvyz5PWgtDLV3t/ZxgVPDPWHewz0=; b=R+vgUD7Z3XyTjTuXV81925ufPKC2i7IDwlKyjkgSqtyJ7vL/EkMph8d21wgCm7AjU9IKr+ AKoWLvysDiroFSkfmtmv1IQScdOgg+SfqN1bkZ8B/RlOR4BdGs5cqZniTfMGXBUM00ndQk 64MJNsRFnoVXUpn22SlmQExzm9+QSzw= X-MC-Unique: STIYrSZhNuq7vdE_jr-4Jg-1 X-Mimecast-MFC-AGG-ID: STIYrSZhNuq7vdE_jr-4Jg_1765273575 To: devel@lists.libvirt.org Subject: [PATCH 3/9] qemuSnapshotPrepare: Prohibit 'manual' disk snapshot mode with VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag Date: Tue, 9 Dec 2025 10:46:03 +0100 Message-ID: <04ff89f5f014f1d3f37cddad6ff46497530053c8.1765272832.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: nAklxEn7MGRNXZ9BQwg0tb0AiN9zYpRId1RfCkZ5Yvc_1765273575 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: T2Z56TVLGZTLTKHYPFSN6TBPIRPPPEJP X-Message-ID-Hash: T2Z56TVLGZTLTKHYPFSN6TBPIRPPPEJP X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: 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: 1765273792802158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa If the snapshot has a disk using 'manual' snapshot mode we keep the VM paused until the user resumes it (presumably after they've done steps to take the disk snapshot). Since quiescing is done via the guest agent this means it will not be possible while the VM is paused. Rather than trying to implement complex recovery from this state prevent the use of VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE for the snapshot. The user still can call virDomainFSFreeze/virDomainFSThaw manually. Signed-off-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index bf25c70826..5b0b52e2ba 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -1075,6 +1075,12 @@ qemuSnapshotPrepare(virDomainObj *vm, } } + if (*has_manual && (*flags & VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE)) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("'manual' disk snapshot mode requires explici= t quiescing (VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE is not supported)")); + return -1; + } + /* Alter flags to let later users know what we learned. */ if (external && !active) *flags |=3D VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY; --=20 2.52.0