From nobody Mon Feb 9 08:29:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1676460574; cv=none; d=zohomail.com; s=zohoarc; b=S4vX6lHw/fplI3KP7/bl/GWxLVcwmOwF4aJGJ7CW2nJNg01DjurQIaLkaPsjbn5zbbwBHDC4x7IXNYfovvLboHg/Ao8E5JMCv7KKQSSiMJl3v+ncr/T/F0J720t+o3laQVAHUdVYuRoJG3JQO8GPsCID6N3MVoUowwFXWwj13KQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676460574; 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=rmqnGaVZGLvAnA5bvhJVKZ4iuUKp/CT/J62IdE9XUrw=; b=FSHL2D4uDaaVU1foSeCuNMYjJcsrCuEXGVIu5vLute9nyK2laYUcc3M6CEPV6nPLZErVWbzcaXfDzBn8tFA7dT5Vk9N5ShcE5ygBdiATqygBuX+Xtdmr0mieBnSV/x9g0LnqwgnQBPXsznRe0OXsR4wjOK47cfnSn3pYJpCOLVE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1676460574920690.8825326298211; Wed, 15 Feb 2023 03:29:34 -0800 (PST) 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-656-2bMp-t8XMoOjsEoed16_EQ-1; Wed, 15 Feb 2023 06:29:31 -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 C28A685A5A3; Wed, 15 Feb 2023 11:29:28 +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 AED542166B31; Wed, 15 Feb 2023 11:29: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 9CECB1946588; Wed, 15 Feb 2023 11:29:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AE7BF1946586 for ; Wed, 15 Feb 2023 11:29:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9184DC15BAD; Wed, 15 Feb 2023 11:29:23 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 89074C15BA0 for ; Wed, 15 Feb 2023 11:29:23 +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 576051871DA1 for ; Wed, 15 Feb 2023 11:29:23 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-136-4Md5teOcNEarIdFbL3rQ4A-1; Wed, 15 Feb 2023 06:29:21 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31FBMbSe023987 for ; Wed, 15 Feb 2023 11:29:21 GMT Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3nrw6uaf0s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Feb 2023 11:29:20 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 31FAr6Wq023603 for ; Wed, 15 Feb 2023 11:29:19 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([9.208.130.102]) by ppma02dal.us.ibm.com (PPS) with ESMTPS id 3np2n7hnqv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Feb 2023 11:29:19 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 31FBTHG410945216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Feb 2023 11:29:17 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F01E3583CC; Wed, 15 Feb 2023 11:29:16 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F97D583D0; Wed, 15 Feb 2023 11:29:16 +0000 (GMT) Received: from oro.sl.cloud9.ibm.com (unknown [9.59.192.176]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 15 Feb 2023 11:29:16 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676460573; 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=rmqnGaVZGLvAnA5bvhJVKZ4iuUKp/CT/J62IdE9XUrw=; b=hKa6FpvVNamICU4awFVM5Wa3a94GYGFgjk74LKaVZS/Q9PbWRYt2jAtpxlzXULBk1X1Ylm 16xILgX032oV62dLMdBtX7vusN1BxSJwnRMEytgKOeNnV7uEAeDHTASffDAHyftOMMK4rV 3cJSutfkiQCGlPBpKAxe6aT8TYnw7c4= X-MC-Unique: 2bMp-t8XMoOjsEoed16_EQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: 4Md5teOcNEarIdFbL3rQ4A-1 From: Or Ozeri To: libvir-list@redhat.com Subject: [PATCH v2 4/6] qemu: Allow active disk snapshots for RBD disks Date: Wed, 15 Feb 2023 05:28:20 -0600 Message-Id: <20230215112822.1887694-5-oro@il.ibm.com> In-Reply-To: <20230215112822.1887694-1-oro@il.ibm.com> References: <20230215112822.1887694-1-oro@il.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: TvAhTThuNUQ-4KlgqAeDqdeVW_d871je X-Proofpoint-GUID: TvAhTThuNUQ-4KlgqAeDqdeVW_d871je X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-15_06,2023-02-15_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 mlxscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 adultscore=0 spamscore=0 mlxlogscore=709 lowpriorityscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302150100 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.8 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: oro@il.ibm.com, dannyh@il.ibm.com 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: 1676460576646100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This commit removes the check disallowing users to take active disk-only snapshots of RBD disks. The actual support for this functionality was added in a previous commit. Signed-off-by: Or Ozeri --- src/qemu/qemu_snapshot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index e82352ba7d..a10bdf7bf2 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -630,6 +630,8 @@ qemuSnapshotPrepare(virDomainObj *vm, for (i =3D 0; i < def->ndisks; i++) { virDomainSnapshotDiskDef *disk =3D &def->disks[i]; virDomainDiskDef *dom_disk =3D vm->def->disks[i]; + bool is_raw_rbd =3D (dom_disk->src->format =3D=3D VIR_STORAGE_FILE= _RAW && + dom_disk->src->protocol =3D=3D VIR_STORAGE_NET_= PROTOCOL_RBD); =20 if (disk->snapshot !=3D VIR_DOMAIN_SNAPSHOT_LOCATION_NO && qemuDomainDiskBlockJobIsActive(dom_disk)) @@ -639,7 +641,7 @@ qemuSnapshotPrepare(virDomainObj *vm, case VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL: found_internal =3D true; =20 - if (def->state =3D=3D VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT && act= ive) { + if (def->state =3D=3D VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT && act= ive && !is_raw_rbd) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("active qemu domains require external dis= k " "snapshots; disk %s requested internal"), @@ -652,7 +654,8 @@ qemuSnapshotPrepare(virDomainObj *vm, return -1; =20 if (dom_disk->src->format > 0 && - dom_disk->src->format !=3D VIR_STORAGE_FILE_QCOW2) { + dom_disk->src->format !=3D VIR_STORAGE_FILE_QCOW2 && + !is_raw_rbd) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("internal snapshot for disk %s unsupporte= d " "for storage type %s"), --=20 2.25.1