From nobody Mon Feb 9 09:54:59 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639753568; cv=none; d=zohomail.com; s=zohoarc; b=TDCdH8ju/JYHq3csZ2Vtdoh7Z9v5gcSod38nDLE2qgIJXdVD4wxz07Px9wxO6BQvjniMODOUSI37gO9kW+/CLW/WPbXjeQ/k3RkmTRzKqW+hYew7vlIPNEdlJppdabgxr49grTkyLzUXJPEX9jCJRVe82cdSoh9fEfRrhVv4FgE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639753568; 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=cIu+eAPqDI5WXW/m2b8+oWXfPGCbth9GwBQHS77C3JM=; b=YnH0izTHHlUduJjnjFec3KYOQga3r5FD8W/AGxbeSl+6+rHfPS/ffUaEtkRuFVsXSftkOSSLVdBWB4kK33d1NJa6hs1WMiKdmxNfRzYhSekrE/cpX1ZMvU5qwd9O1wPXcSRtEE5BXJ4xXdZmr9QvH7LE+mndzLsh9VJpfw3v8qA= 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=pass header.from= (p=none 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 1639753568933960.8507681059008; Fri, 17 Dec 2021 07:06:08 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-546-nJ2KBnJXP3yRJtlDG1apXg-1; Fri, 17 Dec 2021 10:05:12 -0500 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 41131100F943; Fri, 17 Dec 2021 15:05:04 +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 144604E2DB; Fri, 17 Dec 2021 15:05:04 +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 CA58E18095C9; Fri, 17 Dec 2021 15:05:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BHF50Td025241 for ; Fri, 17 Dec 2021 10:05:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 49DD35ED54; Fri, 17 Dec 2021 15:05:00 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C5AC5E26D for ; Fri, 17 Dec 2021 15:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639753567; 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=cIu+eAPqDI5WXW/m2b8+oWXfPGCbth9GwBQHS77C3JM=; b=QF8pC1svCysXsJFyX7MrwOB/xNlTZ2xy1kNxS77EkHDi0UKBj9oomca7ls8yqHCIu+6WJi jHM2P6jKFrXzIQS4ZP6KlZuj1f4+uyWQV7n+TG4590dRX9wrrmnaUriDqzelxpiOMMHoGw Rj0LlLtfmabAuLMgPI/zYP1E3x/JXZ0= X-MC-Unique: nJ2KBnJXP3yRJtlDG1apXg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 6/7] qemu: monitor: Extract whether qcow2 image uses extended L2 allocation data Date: Fri, 17 Dec 2021 16:04:34 +0100 Message-Id: <432a7d354e1a53edc8c2e2313f0570d00353db24.1639753439.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1639753570060100001 Content-Type: text/plain; charset="utf-8" In order to be able to propagate image configuration to newly formatted images we need to be able to query it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor.h | 3 +++ src/qemu/qemu_monitor_json.c | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 29746f0b8e..850e01f026 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -784,6 +784,9 @@ struct _qemuBlockNamedNodeData { /* image version */ bool qcow2v2; + + /* qcow2 subcluster allocation -> extended_l2 */ + bool qcow2extendedL2; }; GHashTable * diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index a3d6eca569..6eedc925c4 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2806,9 +2806,13 @@ qemuMonitorJSONBlockGetNamedNodeDataWorker(size_t po= s G_GNUC_UNUSED, STREQ_NULLABLE(virJSONValueObjectGetString(format_specific, "type"= ), "qcow2")) { virJSONValue *qcow2props =3D virJSONValueObjectGetObject(format_sp= ecific, "data"); - if (qcow2props && - STREQ_NULLABLE(virJSONValueObjectGetString(qcow2props, "compat= "), "0.10")) - ent->qcow2v2 =3D true; + if (qcow2props) { + if (STREQ_NULLABLE(virJSONValueObjectGetString(qcow2props, "co= mpat"), "0.10")) + ent->qcow2v2 =3D true; + + ignore_value(virJSONValueObjectGetBoolean(qcow2props, "extende= d-l2", + &ent->qcow2extendedL= 2)); + } } if (virHashAddEntry(nodes, nodename, ent) < 0) --=20 2.31.1