From nobody Sun Feb 8 23:57:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.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=1587720280; cv=none; d=zohomail.com; s=zohoarc; b=eT7WmcaBpyj1DFZLU31dtvAp69B1iCV6HbLosBvG9UroILzsd1bG0zt+Febhk/NQwxpzVXjOq1Z7c6imhV7Td6U4L5y5AMbYPzN2dNCma56Ac+QYQoRE+ht6ckx/6h1wtj3MMYdOwD9BjUpNFBOyl5y+KsPJ8D/8eFRBaqyiqfc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587720280; 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=BuzdZaFBaYJWYO6TG5x5mEF+T/qTSCXfRYUqdzrVTJY=; b=ikAEKRRM4VB8AWEMSqogkC5zO+TyrT9PjoA1Rqjuc1IQeyTjEnHscYFMQjUce5iQln4hVYf+Zkb6ObgvcSQymcUgysFHYzEOEsiFXTy+gU6tI4Svmz7L23YeA07vrQnELVdpBElCULJrpQTeWFiSb4N+7UM6z+hzCX/lNPqMLjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.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 1587720280446750.170384072015; Fri, 24 Apr 2020 02:24:40 -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-80-VR1uBoMpPbOQUl8DuT9KXw-1; Fri, 24 Apr 2020 05:24:36 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 76644107ACCA; Fri, 24 Apr 2020 09:24:30 +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 41C874038; Fri, 24 Apr 2020 09:24:30 +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 D364B180954D; Fri, 24 Apr 2020 09:24:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03O9OJCU018327 for ; Fri, 24 Apr 2020 05:24:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 14C3960300; Fri, 24 Apr 2020 09:24:19 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C8EE605D1 for ; Fri, 24 Apr 2020 09:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587720279; 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=BuzdZaFBaYJWYO6TG5x5mEF+T/qTSCXfRYUqdzrVTJY=; b=I14hFO5W+3kPJDmCHpLliTUZKqvUdceKyYBs7Y3n/49+5kzTC/JxOd7F5a6PwmZrO/fueY rvAQSzO8GaGVS1zljqLVmYORDJgnQ1Me7tqXHfw+daz1i5gJsnwziUhW1f7aEA9isZhFoT CoZihbXNlOncIQZwag8UE6pMLfa0AVg= X-MC-Unique: VR1uBoMpPbOQUl8DuT9KXw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/4] util: qcow2GetExtensions: Remove support for 'data file' extension Date: Fri, 24 Apr 2020 11:24:07 +0200 Message-Id: <040025b051add0adf761204f28d7a8663fa913cb.1587720115.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.84 on 10.5.11.23 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" The implementation was never finished in libvirt. Remove it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virstoragefile.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 32ca481cc0..6dc9d1f016 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -199,7 +199,6 @@ qedGetBackingStore(char **, int *, const char *, size_t= ); #define QCOW2_HDR_EXTENSION_END 0 #define QCOW2_HDR_EXTENSION_BACKING_FORMAT 0xE2792ACA -#define QCOW2_HDR_EXTENSION_DATA_FILE 0x44415441 #define QCOW2v3_HDR_FEATURES_INCOMPATIBLE (QCOW2_HDR_TOTAL_SIZE) #define QCOW2v3_HDR_FEATURES_COMPATIBLE (QCOW2v3_HDR_FEATURES_INCOMPATIBLE= +8) @@ -426,8 +425,7 @@ cowGetBackingStore(char **res, static int qcow2GetExtensions(const char *buf, size_t buf_size, - int *backingFormat, - char **externalDataStoreRaw) + int *backingFormat) { size_t offset; size_t extension_start; @@ -517,19 +515,6 @@ qcow2GetExtensions(const char *buf, break; } - case QCOW2_HDR_EXTENSION_DATA_FILE: { - if (!externalDataStoreRaw) - break; - - if (VIR_ALLOC_N(*externalDataStoreRaw, len + 1) < 0) - return -1; - memcpy(*externalDataStoreRaw, buf + offset, len); - (*externalDataStoreRaw)[len] =3D '\0'; - VIR_DEBUG("parsed externalDataStoreRaw=3D'%s'", - *externalDataStoreRaw); - break; - } - case QCOW2_HDR_EXTENSION_END: return 0; } @@ -579,7 +564,7 @@ qcowXGetBackingStore(char **res, memcpy(*res, buf + offset, size); (*res)[size] =3D '\0'; - if (qcow2GetExtensions(buf, buf_size, format, NULL) < 0) + if (qcow2GetExtensions(buf, buf_size, format) < 0) return BACKING_STORE_INVALID; return BACKING_STORE_OK; --=20 2.26.0