From nobody Sat Feb 7 05:14:23 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639753513; cv=none; d=zohomail.com; s=zohoarc; b=eIre3x+nsBAGtOKFGcNGdhuqnwxLMwrrcH82cID5j6Xi+KJjsSAnQM7mtUdtt8yf2w/+SlDu5x93RKHKNT/oMTrExnincwaYS5Wk9UUMOP9ix4CCOlzSEra8BTdBxcWScm8jputCxACPfdsgYuD4QQC8nYWETdj5gD3ZPIdFTYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639753513; 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=6lG7yG0B9EPtIYIg+86XoXCZ9rc0+Una7f8hBI416I0=; b=J1WoxXaI7A6NFhWpsmzXPIaPfDMHMnqhM/ajkFQPZgXnklMzgZftc7rg7+j/1EXijUxJnfIXKdo0R77APpYAOO+lzzuWQ3f0ApJLG87xaIKkS0qAqo5bHrGUuNwSB1NT9l4AzXCH/O5fbmMSyqdySiNDfTjx8vrHfaEK8/dJdlw= 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=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.133.124]) by mx.zohomail.com with SMTPS id 163975351375191.99960929671784; Fri, 17 Dec 2021 07:05:13 -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-98-4lnD2DALN_2g6mIGnUuhVQ-1; Fri, 17 Dec 2021 10:05:09 -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 51BC2100F950; Fri, 17 Dec 2021 15:05:01 +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 BC9C75E49C; Fri, 17 Dec 2021 15:05:00 +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 8A41C1806D1C; Fri, 17 Dec 2021 15:05:00 +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 1BHF4xlP025228 for ; Fri, 17 Dec 2021 10:04:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3041C5E26D; Fri, 17 Dec 2021 15:04:59 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 820AE5F906 for ; Fri, 17 Dec 2021 15:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639753512; 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=6lG7yG0B9EPtIYIg+86XoXCZ9rc0+Una7f8hBI416I0=; b=JiX0kqDl2heTNB3HrjnZsDKTXNDgucD6zUzlnwHW9ipbblSfDS90sFcfMeeg5EysL1lUS1 hsE7d+oCVbz023+Ngbv1shd4gudouM4nrPPf8O204w6ohbljoYreUJ/r8zbA3a/ZDQbd+S Y6G2nPWKO1muxpgu8897o3LBlYQozHc= X-MC-Unique: 4lnD2DALN_2g6mIGnUuhVQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/7] qemuBlockStorageSourceCreateGetFormatPropsQcow2: Add support for 'extended-l2' feature Date: Fri, 17 Dec 2021 16:04:33 +0100 Message-Id: <71b627b8bdd5daae1bdb64d81b1c775dff02a2b7.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: 1639753514900100005 Content-Type: text/plain; charset="utf-8" Allow creating the qcow2 with the new subcluster format if required. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_block.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 87dca40179..bff93e96ee 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -2441,18 +2441,23 @@ qemuBlockStorageSourceCreateGetFormatPropsQcow2(vir= StorageSource *src, { g_autoptr(virJSONValue) qcow2props =3D NULL; const char *qcow2version =3D NULL; + bool extendedL2 =3D false; if (STREQ_NULLABLE(src->compat, "0.10")) qcow2version =3D "v2"; else if (STREQ_NULLABLE(src->compat, "1.1")) qcow2version =3D "v3"; + if (src->features) + extendedL2 =3D virBitmapIsBitSet(src->features, VIR_STORAGE_FILE_F= EATURE_EXTENDED_L2); + if (virJSONValueObjectAdd(&qcow2props, "s:driver", "qcow2", "s:file", src->nodestorage, "U:size", src->capacity, "S:version", qcow2version, "P:cluster-size", src->clusterSize, + "B:extended-l2", extendedL2, NULL) < 0) return -1; --=20 2.31.1