From nobody Wed May 1 19:47:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.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 207.211.31.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=1587720266; cv=none; d=zohomail.com; s=zohoarc; b=U5OQJQM0RYCrgo99SA3WSlPDVoLAQUCIvU3PE9JCFljrFZHX/5kWwsX+Y7ItR5e1jfLA4NHiXXwqMl5OmEmDwtkLDrZ5Ok4kxQRDLfnxCVmCmZWb94GOrQ09rX++DdvXn71OACvP8MUa3Lm6PliLDEgA2s/1jJATZjbHtklky9A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587720266; 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=XBapTGgyLlCDfV8MW1KGdTn3BxFLKRZ0udmI1TzNiQU=; b=kl7K8VItSP2bbWZaaKf8KaXtjT8qhsDoeDs41BN9SCfItpaxKTHHcQ6ulBdeT4nrQlZkArNZTRnNM0x0QBV9b71Lrzf1eHE+GBeFzVSPK0fKWfwnlTLqoIAfnqLMyYr+StoX05HKikbNwBAnvn30LlCT1WAQiug4z51OcWwpon0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1587720266365580.2595964892039; Fri, 24 Apr 2020 02:24:26 -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-83-bPb93x0yOF-oLzJ1WuhPwA-1; Fri, 24 Apr 2020 05:24:22 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D7571801504; Fri, 24 Apr 2020 09:24:16 +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 811495D9CC; Fri, 24 Apr 2020 09:24:16 +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 0E58E1809543; Fri, 24 Apr 2020 09:24:16 +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 03O9ODST018289 for ; Fri, 24 Apr 2020 05:24:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 705E79080; Fri, 24 Apr 2020 09:24:13 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id D831460300 for ; Fri, 24 Apr 2020 09:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587720265; 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=XBapTGgyLlCDfV8MW1KGdTn3BxFLKRZ0udmI1TzNiQU=; b=NjxlSiwbNgeAzIl3hHF889KzOJ1AcyXfhwHJBe3qIUC40kmwImIDVer9OfPyvFJLFT9YLK AGbGYdFoXc1/Zr67oDC8gCkDhDi3CdQrE+9IcriZclqM+mAwLYasPelEHV1Gkt0ff/ciff mvLASuOgnLxrOSKvn931haSXUceEv6U= X-MC-Unique: bPb93x0yOF-oLzJ1WuhPwA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/4] security: Remove labelling of 'externalDataStore' Date: Fri, 24 Apr 2020 11:24:04 +0200 Message-Id: <5d96000cd05601ba31c8b994772c789df05948d2.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.79 on 10.5.11.14 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 feature was never completed and is not really being pursued. Remove the storage driver integration. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/security/security_dac.c | 15 --------------- src/security/security_selinux.c | 17 +---------------- src/security/virt-aa-helper.c | 4 ---- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 11fff63bc7..bdc2d7edf3 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -983,14 +983,6 @@ virSecurityDACSetImageLabelRelative(virSecurityManager= Ptr mgr, if (virSecurityDACSetImageLabelInternal(mgr, def, n, parent, isCha= inTop) < 0) return -1; - if (n->externalDataStore && - virSecurityDACSetImageLabelRelative(mgr, - def, - n->externalDataStore, - parent, - flags) < 0) - return -1; - if (!(flags & VIR_SECURITY_DOMAIN_IMAGE_LABEL_BACKING_CHAIN)) break; @@ -1090,13 +1082,6 @@ virSecurityDACRestoreImageLabelInt(virSecurityManage= rPtr mgr, if (virSecurityDACRestoreImageLabelSingle(mgr, def, src, migrated) < 0) return -1; - if (src->externalDataStore && - virSecurityDACRestoreImageLabelSingle(mgr, - def, - src->externalDataStore, - migrated) < 0) - return -1; - return 0; } diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 281c303296..9a929debe1 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1806,13 +1806,6 @@ virSecuritySELinuxRestoreImageLabelInt(virSecurityMa= nagerPtr mgr, if (virSecuritySELinuxRestoreImageLabelSingle(mgr, def, src, migrated)= < 0) return -1; - if (src->externalDataStore && - virSecuritySELinuxRestoreImageLabelSingle(mgr, - def, - src->externalDataStore, - migrated) < 0) - return -1; - return 0; } @@ -1880,7 +1873,7 @@ virSecuritySELinuxSetImageLabelInternal(virSecurityMa= nagerPtr mgr, return 0; use_label =3D parent_seclabel->label; - } else if (parent =3D=3D src || parent->externalDataStore =3D=3D src) { + } else if (parent =3D=3D src) { if (src->shared) { use_label =3D data->file_context; } else if (src->readonly) { @@ -1942,14 +1935,6 @@ virSecuritySELinuxSetImageLabelRelative(virSecurityM= anagerPtr mgr, if (virSecuritySELinuxSetImageLabelInternal(mgr, def, n, parent, i= sChainTop) < 0) return -1; - if (n->externalDataStore && - virSecuritySELinuxSetImageLabelRelative(mgr, - def, - n->externalDataStore, - parent, - flags) < 0) - return -1; - if (!(flags & VIR_SECURITY_DOMAIN_IMAGE_LABEL_BACKING_CHAIN)) break; diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 8526b7b985..6e6dd1b1db 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -898,10 +898,6 @@ storage_source_add_files(virStorageSourcePtr src, if (add_file_path(tmp, depth, buf) < 0) return -1; - if (tmp->externalDataStore && - storage_source_add_files(tmp->externalDataStore, buf, depth) <= 0) - return -1; - depth++; } --=20 2.26.0 From nobody Wed May 1 19:47:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1587720268; cv=none; d=zohomail.com; s=zohoarc; b=kVT4fW+iQdT4DbNVEKE2MO+HBqZwORY2InphxO1e5mLFZpRtgLMilbuEDstA41KQfdwpLiobpcjNVsKlUen7nnWT+C2TEHcOPY1FeTKAAVwCtuAj+vLUouBpRyP6DYPvdeOJGGs2IsZ0GGz6Wrv5CHqIsyOsHqxZAvAbDBFYKWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587720268; 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=sLRGywQz8w/F3T6kblqW4KumX0c60TMpCUiG45hX348=; b=W7WIy0C9q9wPxSvsDdiVajH+4jnKLZiPuJB7aAVf1TRWTSwQfll+ZmpKtmd81WZYiJ0LTOzOa7+87zTjYKyqoLQ7k7raG9yw0a66FeXJVHzccs/3+xe+X0giaOIdJ9YyQcpN++catIwPK/ynF0RoAxlm82TpLIBM40mAqojZ/eQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1587720268845641.5775344850512; Fri, 24 Apr 2020 02:24:28 -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-112-HWAZ0FLzP0ScavHnAgTBtA-1; Fri, 24 Apr 2020 05:24:22 -0400 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 D77F4835B41; Fri, 24 Apr 2020 09:24:16 +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 B0E556084C; Fri, 24 Apr 2020 09:24:16 +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 269754CAA7; Fri, 24 Apr 2020 09:24:15 +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 03O9OEsQ018297 for ; Fri, 24 Apr 2020 05:24:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5F8AA9080; Fri, 24 Apr 2020 09:24:14 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id D101C60300 for ; Fri, 24 Apr 2020 09:24:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587720265; 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=sLRGywQz8w/F3T6kblqW4KumX0c60TMpCUiG45hX348=; b=DTeZJ1lFIqGv2C4IG+Hd+UBarsgXN23sFxGEDdOIsx7JZkUwlt/CfUtdgyC++cPmUhTTcU 8PxePpAoPUdoU2eiSXy1c7zZWEnMvt/ZyWhXHzkNb7OUYI4y7jnZplZ4UL5fszNQpPL8ih MpDK54N7kxNnnF94sFR21+2fkGoYhEA= X-MC-Unique: HWAZ0FLzP0ScavHnAgTBtA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/4] util: Remove 'externalDataStore' field from virStorageSource Date: Fri, 24 Apr 2020 11:24:05 +0200 Message-Id: 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.79 on 10.5.11.13 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" It's not used for anything so we don't need to extract it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virstoragefile.c | 41 --------------------------------------- src/util/virstoragefile.h | 3 --- 2 files changed, 44 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index ffc8bdb344..69c354e7b4 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2475,12 +2475,6 @@ virStorageSourceCopy(const virStorageSource *src, return NULL; } - if (src->externalDataStore) { - if (!(def->externalDataStore =3D virStorageSourceCopy(src->externa= lDataStore, - true))) - return NULL; - } - /* ssh config passthrough for libguestfs */ def->ssh_host_key_check_disabled =3D src->ssh_host_key_check_disabled; def->ssh_user =3D g_strdup(src->ssh_user); @@ -2712,9 +2706,6 @@ virStorageSourceClear(virStorageSourcePtr def) virStorageSourceSliceFree(def->sliceStorage); - virObjectUnref(def->externalDataStore); - def->externalDataStore =3D NULL; - virStorageNetHostDefFree(def->nhosts, def->hosts); virStorageAuthDefFree(def->auth); virObjectUnref(def->privateData); @@ -4107,24 +4098,6 @@ virStorageSourceNewFromBacking(virStorageSourcePtr p= arent, } -static int -virStorageSourceNewFromExternalData(virStorageSourcePtr parent, - virStorageSourcePtr *externalDataStore) -{ - int rc; - - if ((rc =3D virStorageSourceNewFromChild(parent, - parent->externalDataStoreRaw, - externalDataStore)) < 0) - return rc; - - /* qcow2 data_file can only be raw */ - (*externalDataStore)->format =3D VIR_STORAGE_FILE_RAW; - (*externalDataStore)->readonly =3D parent->readonly; - return rc; -} - - /** * @src: disk source definition structure * @fd: file descriptor @@ -5351,20 +5324,6 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr= src, return -1; } - if (src->externalDataStoreRaw) { - g_autoptr(virStorageSource) externalDataStore =3D NULL; - - if ((rv =3D virStorageSourceNewFromExternalData(src, - &externalDataStore))= < 0) - return -1; - - /* the file would not be usable for VM usage */ - if (rv =3D=3D 1) - return 0; - - src->externalDataStore =3D g_steal_pointer(&externalDataStore); - } - return 0; } diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 7939c09cd5..8fe8e7c822 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -334,9 +334,6 @@ struct _virStorageSource { /* backing chain of the storage source */ virStorageSourcePtr backingStore; - /* external data store storage source */ - virStorageSourcePtr externalDataStore; - /* metadata for storage driver access to remote and local volumes */ virStorageDriverDataPtr drv; --=20 2.26.0 From nobody Wed May 1 19:47:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1587720277; cv=none; d=zohomail.com; s=zohoarc; b=TMuzpSeKCZpRE+oPucdfZ4/pn3SGkDGt0yMH0zHDtAqUtN8QyWnpUHkCE5B6/BCC16UGa9+DEqICf2sh8AWPR0BXlZ+XqNezsLIl6d82mkZeQceB4he5kWA59WmqWGUpujnhvm11nYT/rCh+DnH1z+Rgy+p29IIcQKoRZ8FyISk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587720277; 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=XggMa1gtIgOjbssz3bWBkVY9VEK4yz3BLxqWIu7sCaA=; b=jeQNH5/VfrJS2pbiCGN7eoBHEzk2ocR/CxtQL40Vf/GSAdTGEHvt2GzVfvKYlJ0iEInVsfuKnCBzrVmxpoTh5hmI//9xeHY9/dEE9S2iBtVJv7DwS6Yjqdef5V9NIQVhDm1rnFp3NR7OhjGRSNfcpnn7uMvAPMn8YS5Cyvwkdq8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1587720277094300.49083132331907; Fri, 24 Apr 2020 02:24:37 -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-499-Y4HiSYHoMJKpHDAiIaSq6w-1; Fri, 24 Apr 2020 05:24:32 -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 ECFC4100CCCC; Fri, 24 Apr 2020 09:24:26 +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 C20AA4038; Fri, 24 Apr 2020 09:24:26 +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 7DDAE4CAA7; Fri, 24 Apr 2020 09:24:26 +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 03O9OFPT018304 for ; Fri, 24 Apr 2020 05:24:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4DDD860300; Fri, 24 Apr 2020 09:24:15 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id B54E49080 for ; Fri, 24 Apr 2020 09:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587720275; 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=XggMa1gtIgOjbssz3bWBkVY9VEK4yz3BLxqWIu7sCaA=; b=KZaaOH9vcoQ75vmR+ZTYq0WRMMKG621XERuN/6NdaLRMZqnhBX68TBMO+r2uH8OMXjX3Y4 tJgMl/Q5JtjlK+/9dUKaImf3st57/BGFunklQi3Ru3Y2Vzz8j32Lc0CWOMaFNPu1WRaG2Z sQkc7Z61xDA6GTgTBbTWRx0GcSRwoqA= X-MC-Unique: Y4HiSYHoMJKpHDAiIaSq6w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/4] util: Remove 'externalDataStoreRaw' field from virStorageSource Date: Fri, 24 Apr 2020 11:24:06 +0200 Message-Id: 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" It's not used for anything so we don't need to extract it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virstoragefile.c | 14 ++------------ src/util/virstoragefile.h | 2 -- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 69c354e7b4..32ca481cc0 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1022,12 +1022,6 @@ virStorageFileGetMetadataInternal(virStorageSourcePt= r meta, fileTypeInfo[meta->format].getFeatures(&meta->features, meta->form= at, buf, len) < 0) return -1; - VIR_FREE(meta->externalDataStoreRaw); - if (meta->format =3D=3D VIR_STORAGE_FILE_QCOW2 && - qcow2GetExtensions(buf, len, NULL, &meta->externalDataStoreRaw) < = 0) { - return -1; - } - VIR_FREE(meta->compat); if (meta->format =3D=3D VIR_STORAGE_FILE_QCOW2 && meta->features) meta->compat =3D g_strdup("1.1"); @@ -2410,7 +2404,6 @@ virStorageSourceCopy(const virStorageSource *src, def->relPath =3D g_strdup(src->relPath); def->backingStoreRaw =3D g_strdup(src->backingStoreRaw); def->backingStoreRawFormat =3D src->backingStoreRawFormat; - def->externalDataStoreRaw =3D g_strdup(src->externalDataStoreRaw); def->snapshot =3D g_strdup(src->snapshot); def->configFile =3D g_strdup(src->configFile); def->nodeformat =3D g_strdup(src->nodeformat); @@ -2702,7 +2695,6 @@ virStorageSourceClear(virStorageSourcePtr def) virStorageSourceSeclabelsClear(def); virStoragePermsFree(def->perms); VIR_FREE(def->timestamps); - VIR_FREE(def->externalDataStoreRaw); virStorageSourceSliceFree(def->sliceStorage); @@ -5280,13 +5272,11 @@ virStorageFileGetMetadataRecurse(virStorageSourcePt= r src, return -1; /* If we probed the format we MUST ensure that nothing else than the c= urrent - * image (this includes both backing files and external data store) is - * considered for security labelling and/or recursion. */ + * image is considered for security labelling and/or recursion. */ if (orig_format =3D=3D VIR_STORAGE_FILE_AUTO) { - if (src->backingStoreRaw || src->externalDataStoreRaw) { + if (src->backingStoreRaw) { src->format =3D VIR_STORAGE_FILE_RAW; VIR_FREE(src->backingStoreRaw); - VIR_FREE(src->externalDataStoreRaw); return -2; } } diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 8fe8e7c822..d56d5c45e3 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -345,8 +345,6 @@ struct _virStorageSource { * current file. */ char *backingStoreRaw; virStorageFileFormat backingStoreRawFormat; - /* Name of the child data file recorded in metadata of the current fil= e. */ - char *externalDataStoreRaw; /* metadata that allows identifying given storage source */ char *nodeformat; /* name of the format handler object */ --=20 2.26.0 From nobody Wed May 1 19:47:44 2024 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