From nobody Tue Feb 10 12:57:26 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=fail(p=reject dis=none) header.from=il.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1673513109; cv=none; d=zohomail.com; s=zohoarc; b=HB6LAcH+cY43aNw4WTGx5pFC8uBKFHbu4jvsIewZi6i3/PIWXgFyS8qo/CZDPXr6eorBPPeC/xDK0La59gv1K6KY+cQPK8rwfgdrTjywQ1aMB6VpV5apnkbGMIRunyzGVU50glRAe5DhMYP/N1qhReEcCspNcVe40GbyU/YNMoo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673513109; h=Content-Type:Content-Transfer-Encoding:Cc: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=9i85UgT0zqTRb9NJHZbc9NkREw3pjKq86doP/fuQ2Tc=; b=DcK0HCSapJZsJLW/YXNwNJbCYaQaWDMY2t/Z82FIaidxsd9i922t+hYgOiTLRgOJIZHOhqj9pyR4VCkwTtxNA8PZt5hZU4LS1C4u6kTHHggjrvDLDNUsJBxc90jD8odFEWhOs+Mt046wVbcrkalnpL7OCHMxfCmbhRCxh/Hb4Do= 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=fail header.from= (p=reject 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 1673513109693516.4568305161143; Thu, 12 Jan 2023 00:45:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-169-YsrphaF4MjyvmCBxY_mRsg-1; Thu, 12 Jan 2023 03:45:04 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9B3AC38145A3; Thu, 12 Jan 2023 08:45:01 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 803AC2166B26; Thu, 12 Jan 2023 08:45:00 +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 2C737194704E; Thu, 12 Jan 2023 08:44:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2E2AF1947043 for ; Thu, 12 Jan 2023 08:44:58 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0B12F492C18; Thu, 12 Jan 2023 08:44:58 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 03748492C14 for ; Thu, 12 Jan 2023 08:44:57 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DA43D101A52E for ; Thu, 12 Jan 2023 08:44:57 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-668-Kuw460w5OqOLzlqTH7fHmQ-1; Thu, 12 Jan 2023 03:44:55 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30C6rtdK006948 for ; Thu, 12 Jan 2023 08:44:54 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n2dbdtdxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Jan 2023 08:44:53 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30C7gtot014451 for ; Thu, 12 Jan 2023 08:44:53 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([9.208.130.98]) by ppma01dal.us.ibm.com (PPS) with ESMTPS id 3n1kv5a192-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Jan 2023 08:44:52 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30C8iojO63177002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Jan 2023 08:44:50 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D9D3D5805D; Thu, 12 Jan 2023 08:44:49 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E6AC58053; Thu, 12 Jan 2023 08:44:49 +0000 (GMT) Received: from oro.sl.cloud9.ibm.com (unknown [9.59.192.176]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Thu, 12 Jan 2023 08:44:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673513108; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9i85UgT0zqTRb9NJHZbc9NkREw3pjKq86doP/fuQ2Tc=; b=Pn2UNn6iK8QQjPU7i9BWXqOJdklgxPNB3kaGRW3eMx4pK/r4qHHajtbOa6xtHwZ6tQJkzn ea4QSPEze91L1tuxZJ2uJwmjq53NPuOJrGr6RwbOW4/5FRdFJAK/qchV5G5kvCxWHniFJK GRkDhxiGFiFox9+mkhZZSLk9UVtLXX4= X-MC-Unique: YsrphaF4MjyvmCBxY_mRsg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: Kuw460w5OqOLzlqTH7fHmQ-1 From: Or Ozeri To: libvir-list@redhat.com Subject: [PATCH v1 3/4] qemu: allow mixing active internal and external active disk snapshots Date: Thu, 12 Jan 2023 02:44:38 -0600 Message-Id: <20230112084439.2363101-4-oro@il.ibm.com> In-Reply-To: <20230112084439.2363101-1-oro@il.ibm.com> References: <20230112084439.2363101-1-oro@il.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 00xUaV4sdPUOKXrK5D6j53_ie7OiaJ0f X-Proofpoint-GUID: 00xUaV4sdPUOKXrK5D6j53_ie7OiaJ0f X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_04,2023-01-11_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=785 malwarescore=0 bulkscore=0 phishscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301120059 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: , Cc: Or Ozeri Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: 1673513110637100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Previous commit added support for active internal disk snapshots, using the same qmp_transaction used also for external snapshots. The same transaction can be used to mix internal and external snapshots. To allow this, this commit simply removes the check that disallows mixing for active snapshots. Offline snapshots still do not support mixing. Signed-off-by: Or Ozeri --- src/qemu/qemu_snapshot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 9146ecae2f..da29fa2853 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -727,10 +727,9 @@ qemuSnapshotPrepare(virDomainObj *vm, return -1; } =20 - /* For now, we don't allow mixing internal and external disks. - * XXX technically, we could mix internal and external disks for + /* For now, we don't allow mixing internal and external disks for * offline snapshots */ - if ((found_internal && external) || + if ((found_internal && external && !active) || (def->memory =3D=3D VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL && exte= rnal) || (def->memory =3D=3D VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL && foun= d_internal)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", --=20 2.25.1