From nobody Mon Feb 9 04:50:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1748508730; cv=none; d=zohomail.com; s=zohoarc; b=LR2auC14WelhPr6Cu+jOuNqADuRd+WREUFcDxrtoQzwMUJDfmh9Nyi9ckpzAqvnzmiw2E4RoXAx0cu0jBJI3QYS/Jl4oCuaj431Z+7cgmJBfQEZ2eZthy/cMtMHM3BizFF0f9gptc3HEOk7gWrjhMoELH9FY/eIGTVTEIxgHDN0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748508730; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=Sv+vC2YSv9+YW6hrrIS0q9ZvSffS/2l/zQ78p1N1o18=; b=TLuImQRmMzGzXZZ6QHfRUqF1LDtk4jj3JN+rBQhbn3+kBeoAC3D6SAYmWSGCi+iROC8RNgrubKBt4VQBoqjGGd4zfyXcw51qIEPysTxUM8p0159Q565WotKIz/sEsIG5W9vqtyHmgmO2wX1Xp11gwsQh6v05Co9Lvh2CmRktsjU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1748508730444314.29529765075654; Thu, 29 May 2025 01:52:10 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7AC4B12A2; Thu, 29 May 2025 04:52:09 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 477E4135B; Thu, 29 May 2025 04:44:11 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7C347128C; Thu, 29 May 2025 04:43:54 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B23E812A8 for ; Thu, 29 May 2025 04:43:32 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-426-NY-C-ZEVNi6vTVc2YfTzwg-1; Thu, 29 May 2025 04:43:30 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E88731800256 for ; Thu, 29 May 2025 08:43:29 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.44.22.3]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 28C4019560B3 for ; Thu, 29 May 2025 08:43:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748508212; h=from:from: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; bh=G8+Y4xhVovcMB+rPZ3svkV6wo2Zz2eq4Bc9yW5bM0is=; b=YuxmP8WosiLGUaUZm8rsgCl6GYnhlsG6oDS/PnTGv++y0swEOjrXlQQ8muY2j+GNlj4daI 9fUW1ga/VR0MiDt7vQXt9EPok5z3nISLOrt4sB1R2BYHZVxrLs7y0+W//vfmzkuXuvAZK+ /uI1lA15jw1GOVMdqiVmHHCTAgSsegU= X-MC-Unique: NY-C-ZEVNi6vTVc2YfTzwg-1 X-Mimecast-MFC-AGG-ID: NY-C-ZEVNi6vTVc2YfTzwg_1748508210 To: devel@lists.libvirt.org Subject: [PATCH 14/15] storage_file_probe: Move setting of 'compat' attribute to qcow2GetFeatures Date: Thu, 29 May 2025 10:43:08 +0200 Message-ID: <6a7ffb001393eebbd9813892bdead6956c5a5b48.1748507931.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: HD2wb8QTuFJ-LGWiHm6f44B3QGo130qxJsjaI79yiZM_1748508210 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: OLUEJHZRV2XXRQL3AMCTJ6B27NUKJOQB X-Message-ID-Hash: OLUEJHZRV2XXRQL3AMCTJ6B27NUKJOQB X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1748508730886116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Since the 'compat' field is set based on qcow2 features it belongs to the qcow2 code rather than to the main metadata probing function. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/stora= ge_file_probe.c index 73751c7a2f..9fcc052ea3 100644 --- a/src/storage_file/storage_file_probe.c +++ b/src/storage_file/storage_file_probe.c @@ -579,6 +579,7 @@ qcow2GetFeatures(virStorageSource *meta, int version =3D virReadBufInt32BE(buf + QCOWX_HDR_VERSION); g_clear_pointer(&meta->features, virBitmapFree); + g_clear_pointer(&meta->compat, g_free); if (version =3D=3D 2) return 0; @@ -587,6 +588,7 @@ qcow2GetFeatures(virStorageSource *meta, return -1; meta->features =3D virBitmapNew(VIR_STORAGE_FILE_FEATURE_LAST); + meta->compat =3D g_strdup("1.1"); qcow2GetFeaturesProcessGroup(virReadBufInt64BE(buf + QCOW2v3_HDR_FEATU= RES_COMPATIBLE), qcow2CompatibleFeatureArray, @@ -997,10 +999,6 @@ virStorageFileProbeGetMetadata(virStorageSource *meta, buf, len); } - VIR_FREE(meta->compat); - if (meta->format =3D=3D VIR_STORAGE_FILE_QCOW2 && meta->features) - meta->compat =3D g_strdup("1.1"); - return 0; } --=20 2.49.0