From nobody Mon Feb 9 12:11:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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=1573654951; cv=none; d=zoho.com; s=zohoarc; b=ZpyDLaMYIXDw0qU6jzJSc1C47+KsKPvYPwd10YS2JgkO8dHA8pg9f6fyHPLPtD+3aN8rzavWQ70L4yLr2mjrThRFBBW0bP43qZwy7633amuyyiv/OtNrUzP7jhU8+SBH5EphVPBWCUMBJXqEHxc4YhZRxYJ0oaSbCmZ1rQRPRpU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573654951; 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=O+3sacVsbUIARwfJtmYx5lo/yixMBd2m0yRjvZjGIZg=; b=OtRjf3cw2nLK2o7M0ix02eMshXuTJ+0DCEi3xeioNP+/9MqOg8tWyI9aXB96rfTFOW5BF5fWHsVuvXWhKRZNrZjggDtdl/KhghF2A8yGCXVjNx33Bu2IuV1bX+NWxy/iXkhuYUH0VqhDRoiJQnypn74PUzlPunxIDfkLziyI9mQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 15736549512691023.8523448036738; Wed, 13 Nov 2019 06:22:31 -0800 (PST) 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-350-l8sR5HAhPvy3WK27b2FTFg-1; Wed, 13 Nov 2019 09:22:27 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 45B5B10753FC; Wed, 13 Nov 2019 14:22:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D44AB4DA0A; Wed, 13 Nov 2019 14:22:21 +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 6348B4E562; Wed, 13 Nov 2019 14:22:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xADEMIFw011575 for ; Wed, 13 Nov 2019 09:22:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2A01863BBB; Wed, 13 Nov 2019 14:22:18 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 80DBB6365C; Wed, 13 Nov 2019 14:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573654950; 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=O+3sacVsbUIARwfJtmYx5lo/yixMBd2m0yRjvZjGIZg=; b=CG+BT3I6fq2acgp9aMPpOvLGGv2YPR/GRY1qwq5SU7uKf20NhAWDSbCrlWJ8m1SZF7u5va nAzM6uE7B8ijbM14ahzKHIsC+TeRoZs/fH2cO+NyPPvlJa77SkemdXmGSezoagqt/JYHSi VyZQWLp1zEHKGHzPHg3Wf1jm6NmvjjQ= From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 13 Nov 2019 15:22:11 +0100 Message-Id: <343406f16b60749458a17161818fb35286cadc75.1573654864.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Pavel Mores Subject: [libvirt] [PATCH 1/2] qemu: blockjob: Transfer 'readonly' state of images after active layer block commit 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.16 X-MC-Unique: l8sR5HAhPvy3WK27b2FTFg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When commiting a different image becomes the disk source. Since we store the readonly flag per-image we must update it to the same state the original image had. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 2dddb1e408..5c294f8024 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -1106,6 +1106,7 @@ qemuBlockJobProcessEventCompletedActiveCommit(virQEMU= DriverPtr driver, cfgbase =3D cfgbaseparent->backingStore; cfgbaseparent->backingStore =3D NULL; cfgdisk->src =3D cfgbase; + cfgdisk->src->readonly =3D cfgtop->readonly; virObjectUnref(cfgtop); } @@ -1115,6 +1116,7 @@ qemuBlockJobProcessEventCompletedActiveCommit(virQEMU= DriverPtr driver, baseparent->backingStore =3D NULL; job->disk->src =3D job->data.commit.base; + job->disk->src->readonly =3D job->data.commit.top->readonly; qemuBlockJobEventProcessConcludedRemoveChain(driver, vm, asyncJob, job= ->data.commit.top); virObjectUnref(job->data.commit.top); --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list