From nobody Mon Feb 9 12:27:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1589216163; cv=none; d=zohomail.com; s=zohoarc; b=Vhy31YBSJgiZVBG4mLxxZ3exWmtMjqq/NuOl/wb+ovOH5JocekLO6PCmGXSecT+7fj6LohaWiaWqY21ErSda+n61jUFQ2nbQZbURkyWqkn5ppGbb3eFL2apF47tC1TY94x/ronMCUxPcMiThBvfw2dJHZZTfipMYgkUEiReXcGs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589216163; 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=TIGB9YDcy/5yTGvkZQWQeGzU7geZ9Sov2HNJnzGiASY=; b=MieEjWR2Us/F/erETXjmdZ6bvAQ2viT+bTV1zxMqC5NqDfHeAYAK+bBmpM6+xUPeCHSCpLWWKcZc2BKYeSe7ICG4a52sBDMi3RFEh+UFuDn3XRDYOM/sZopEvlQi8RwLyNXJe8QBu4J7iwn9g3puGdIjtRcfL4ybZJzj7tO5J7Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1589216163640342.13587480975514; Mon, 11 May 2020 09:56:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-177-0Xa4KfyNMGiv8lza1VF13Q-1; Mon, 11 May 2020 12:56:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C31CF100CCC6; Mon, 11 May 2020 16:55:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1B0467642; Mon, 11 May 2020 16:55:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 71B021809554; Mon, 11 May 2020 16:55:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04BGtqES016633 for ; Mon, 11 May 2020 12:55:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5049B60BF1; Mon, 11 May 2020 16:55:52 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3A9F60C87 for ; Mon, 11 May 2020 16:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589216162; 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=TIGB9YDcy/5yTGvkZQWQeGzU7geZ9Sov2HNJnzGiASY=; b=Zvriqbum5gjYlVsQO+NhNy98S2xXPfzZAGL1tRCnt8sb9I4ClEFAlh6Xtmqx6aiTWnkzxG UJ31h9uLTiBRKUdTaF5xLEVkvO0PmbsmPB6cKedNt1ksUteVtdsh7t4zQAf2rT51mdTgeX btt/nyq0ejsyzJg8SKobdXOKUYJjl30= X-MC-Unique: 0Xa4KfyNMGiv8lza1VF13Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/5] qemu: snapshot: Allow snapshots of read-only disks when we can create them Date: Mon, 11 May 2020 18:55:40 +0200 Message-Id: <3fd88826bd7c45e5e6e133c6f69b4cb95892897e.1589216000.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" With -blockdev or when reusing externally created images and thus without the need for formatting the image we actually can support snapshots of read-only disks. Arguably it's not very useful so they are not done by default but users of libvirt such as oVirt are actually using this. https://bugzilla.redhat.com/show_bug.cgi?id=3D1832204 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1c7c87128d..29d964f1e8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14683,7 +14683,7 @@ qemuDomainSnapshotPrepareDiskExternal(virDomainDisk= DefPtr disk, int err; int rc; - if (disk->src->readonly) { + if (disk->src->readonly && !(reuse || blockdev)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("external snapshot for readonly disk %s " "is not supported"), disk->dst); --=20 2.26.2