From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 150783529717859.85351920054609; Thu, 12 Oct 2017 12:08:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E194F7E391; Thu, 12 Oct 2017 19:08:15 +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 B074D1751B; Thu, 12 Oct 2017 19:08:15 +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 5F32E18355D8; Thu, 12 Oct 2017 19:08:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ86rc001629 for ; Thu, 12 Oct 2017 15:08:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id C4D075EDE6; Thu, 12 Oct 2017 19:08:06 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8325B5EDEC; Thu, 12 Oct 2017 19:08:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E194F7E391 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:32 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 1/9] conf: domain: Simplify return from backing store parser 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 12 Oct 2017 19:08:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Use VIR_STEAL_PTR to remove conditional cleanup. Reviewed-by: Eric Blake --- src/conf/domain_conf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 54be9028d..f7c9160b4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8315,12 +8315,11 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr c= txt, virDomainDiskBackingStoreParse(ctxt, backingStore, flags) < 0) goto cleanup; - src->backingStore =3D backingStore; + VIR_STEAL_PTR(src->backingStore, backingStore); ret =3D 0; cleanup: - if (ret < 0) - virStorageSourceFree(backingStore); + virStorageSourceFree(backingStore); VIR_FREE(type); VIR_FREE(format); ctxt->node =3D save_ctxt; --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507835300440722.6119572653904; Thu, 12 Oct 2017 12:08:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2BAEA2D0FA0; Thu, 12 Oct 2017 19:08:19 +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 09A1C5D6A6; Thu, 12 Oct 2017 19:08:19 +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 C43B33FAED; Thu, 12 Oct 2017 19:08:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ8Avk001647 for ; Thu, 12 Oct 2017 15:08:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7A0DB5D75F; Thu, 12 Oct 2017 19:08:10 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 417325EDEF; Thu, 12 Oct 2017 19:08:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2BAEA2D0FA0 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:33 +0200 Message-Id: <9faecc4dc45d9fa37e4ddca16cd25b3a1c6635e6.1507835192.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 2/9] conf: Make backing store index optional 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 12 Oct 2017 19:08:19 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Index will remain an internal property even if we allow backing store parsing from the XML, so we need to allow backing store without it in the schema. Reviewed-by: Eric Blake --- docs/schemas/domaincommon.rng | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4dbda6932..a3aa6eba2 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1415,9 +1415,11 @@ + + --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507836323072976.6830942575549; Thu, 12 Oct 2017 12:25:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AEA12C04D2EF; Thu, 12 Oct 2017 19:25:21 +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 AD2C15D6AE; Thu, 12 Oct 2017 19:25:19 +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 63A874ED30; Thu, 12 Oct 2017 19:25:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ8E2h001666 for ; Thu, 12 Oct 2017 15:08:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6AF6C5D6A6; Thu, 12 Oct 2017 19:08:14 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77EF26293F; Thu, 12 Oct 2017 19:08:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AEA12C04D2EF Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:34 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 3/9] util: storage: Store backing chain index in virStorageSource 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 12 Oct 2017 19:25:22 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The backing store indexes were not bound to the storage sources in any way. To allow us to bind a given alias to a given storage source we need to save the index in virStorageSource. The backing store ids are now generated when detecting the backing chain. Since we don't re-detect the backing chain after snapshots, the numbering needs to be fixed there. Reviewed-by: Eric Blake --- src/conf/domain_conf.c | 22 +++++++++++++++------- src/qemu/qemu_driver.c | 14 ++++++++++++++ src/storage/storage_source.c | 9 ++++++--- src/util/virstoragefile.c | 1 + src/util/virstoragefile.h | 1 + 5 files changed, 37 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f7c9160b4..45fa57a14 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8269,6 +8269,7 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctx= t, xmlNodePtr source; char *type =3D NULL; char *format =3D NULL; + char *idx =3D NULL; int ret =3D -1; if (!(ctxt->node =3D virXPathNode("./backingStore[*]", ctxt))) { @@ -8279,6 +8280,13 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ct= xt, if (VIR_ALLOC(backingStore) < 0) goto cleanup; + if (!(flags & VIR_DOMAIN_DEF_PARSE_INACTIVE) && + (idx =3D virXMLPropString(ctxt->node, "index")) && + virStrToLong_uip(idx, NULL, 10, &backingStore->id) < 0) { + virReportError(VIR_ERR_XML_ERROR, _("invalid disk index '%s'"), id= x); + goto cleanup; + } + if (!(type =3D virXMLPropString(ctxt->node, "type"))) { virReportError(VIR_ERR_XML_ERROR, "%s", _("missing disk backing store type")); @@ -21898,8 +21906,7 @@ virDomainDiskSourceFormat(virBufferPtr buf, static int virDomainDiskBackingStoreFormat(virBufferPtr buf, virStorageSourcePtr backingStore, - const char *backingStoreRaw, - unsigned int idx) + const char *backingStoreRaw) { const char *type; const char *format; @@ -21926,8 +21933,10 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf, return -1; } - virBufferAsprintf(buf, "\n", - type, idx); + virBufferAsprintf(buf, "id !=3D 0) + virBufferAsprintf(buf, " index=3D'%u'", backingStore->id); + virBufferAddLit(buf, ">\n"); virBufferAdjustIndent(buf, 2); virBufferAsprintf(buf, "\n", format); @@ -21935,8 +21944,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf, if (virDomainDiskSourceFormatInternal(buf, backingStore, 0, 0, true) <= 0 || virDomainDiskBackingStoreFormat(buf, backingStore->backingStore, - backingStore->backingStoreRaw, - idx + 1) < 0) + backingStore->backingStoreRaw) < 0) return -1; virBufferAdjustIndent(buf, -2); @@ -22072,7 +22080,7 @@ virDomainDiskDefFormat(virBufferPtr buf, * persistent storage of backing chains is ready. */ if (!(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE) && virDomainDiskBackingStoreFormat(buf, def->src->backingStore, - def->src->backingStoreRaw, 1) < 0) + def->src->backingStoreRaw) < 0) return -1; virBufferEscapeString(buf, "\n", def->doma= in_name); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7c6f1674a..0260c40ef 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14442,6 +14442,17 @@ qemuDomainSnapshotDiskDataCollect(virQEMUDriverPtr= driver, } +static void +qemuDomainSnapshotUpdateDiskSourcesRenumber(virStorageSourcePtr src) +{ + virStorageSourcePtr next; + unsigned int idx =3D 1; + + for (next =3D src->backingStore; next; next =3D next->backingStore) + next->id =3D idx++; +} + + /** * qemuDomainSnapshotUpdateDiskSources: * @dd: snapshot disk data object @@ -14464,6 +14475,9 @@ qemuDomainSnapshotUpdateDiskSources(qemuDomainSnaps= hotDiskDataPtr dd, VIR_STEAL_PTR(dd->src->backingStore, dd->disk->src); VIR_STEAL_PTR(dd->disk->src, dd->src); + /* fix numbering of disks */ + qemuDomainSnapshotUpdateDiskSourcesRenumber(dd->disk->src); + if (dd->persistdisk) { VIR_STEAL_PTR(dd->persistsrc->backingStore, dd->persistdisk->src); VIR_STEAL_PTR(dd->persistdisk->src, dd->persistsrc); diff --git a/src/storage/storage_source.c b/src/storage/storage_source.c index bf4762237..864c69928 100644 --- a/src/storage/storage_source.c +++ b/src/storage/storage_source.c @@ -396,7 +396,8 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr sr= c, uid_t uid, gid_t gid, bool allow_probe, bool report_broken, - virHashTablePtr cycle) + virHashTablePtr cycle, + unsigned int depth) { int ret =3D -1; const char *uniqueName; @@ -474,7 +475,7 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr sr= c, if ((ret =3D virStorageFileGetMetadataRecurse(backingStore, parent, uid, gid, allow_probe, report_broken, - cycle)) < 0) { + cycle, depth + 1)) < 0) { if (report_broken) goto cleanup; @@ -489,6 +490,8 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr sr= c, ret =3D 0; cleanup: + if (src->backingStore) + src->backingStore->id =3D depth; VIR_FREE(buf); virStorageFileDeinit(src); virStorageSourceFree(backingStore); @@ -543,7 +546,7 @@ virStorageFileGetMetadata(virStorageSourcePtr src, } ret =3D virStorageFileGetMetadataRecurse(src, src, uid, gid, - allow_probe, report_broken, cyc= le); + allow_probe, report_broken, cyc= le, 1); virHashFree(cycle); return ret; diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index dd4494940..2b9f4c892 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2030,6 +2030,7 @@ virStorageSourceCopy(const virStorageSource *src, if (VIR_ALLOC(ret) < 0) return NULL; + ret->id =3D src->id; ret->type =3D src->type; ret->protocol =3D src->protocol; ret->format =3D src->format; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 74dee10f2..d3bafefc3 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -227,6 +227,7 @@ typedef virStorageSource *virStorageSourcePtr; * IMPORTANT: When adding fields to this struct it's also necessary to add * appropriate code to the virStorageSourceCopy deep copy function */ struct _virStorageSource { + unsigned int id; /* backing chain identifier, 0 is unset */ int type; /* virStorageType */ char *path; int protocol; /* virStorageNetProtocol */ --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507835303062486.05891082468247; Thu, 12 Oct 2017 12:08:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D35153D97B; Thu, 12 Oct 2017 19:08:21 +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 AC0575EDF2; Thu, 12 Oct 2017 19:08:21 +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 746C33FC71; Thu, 12 Oct 2017 19:08:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ8KaV001678 for ; Thu, 12 Oct 2017 15:08:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id F12855EDEE; Thu, 12 Oct 2017 19:08:20 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09C4C5EDFC; Thu, 12 Oct 2017 19:08:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D35153D97B Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:35 +0200 Message-Id: <1f463b2241a8d0d0042ab6c207dc18287390e3fe.1507835192.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 4/9] util: storage: use stored index to lookup disks 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 12 Oct 2017 19:08:22 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We can now use the backing store ID directly rather than counting the number of images seen while looking up images. --- src/util/virstoragefile.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 2b9f4c892..9568a5068 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1588,25 +1588,14 @@ virStorageFileChainLookup(virStorageSourcePtr chain, const char *start =3D chain->path; char *parentDir =3D NULL; bool nameIsFile =3D virStorageIsFile(name); - size_t i =3D 0; if (!parent) parent =3D &prev; *parent =3D NULL; if (startFrom) { - while (chain && chain !=3D startFrom->backingStore) { + while (chain && chain !=3D startFrom->backingStore) chain =3D chain->backingStore; - i++; - } - - if (idx && idx < i) { - virReportError(VIR_ERR_INVALID_ARG, - _("requested backing store index %u is above '%= s' " - "in chain for '%s'"), - idx, NULLSTR(startFrom->path), NULLSTR(start)); - return NULL; - } *parent =3D startFrom; } @@ -1616,8 +1605,8 @@ virStorageFileChainLookup(virStorageSourcePtr chain, if (!chain->backingStore) break; } else if (idx) { - VIR_DEBUG("%zu: %s", i, chain->path); - if (idx =3D=3D i) + VIR_DEBUG("%u: %s", chain->id, chain->path); + if (idx =3D=3D chain->id) break; } else { if (STREQ_NULLABLE(name, chain->relPath) || @@ -1649,7 +1638,6 @@ virStorageFileChainLookup(virStorageSourcePtr chain, } *parent =3D chain; chain =3D chain->backingStore; - i++; } if (!chain) --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507835313641307.00508503001754; Thu, 12 Oct 2017 12:08:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C59D80C19; Thu, 12 Oct 2017 19:08:32 +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 36DED5EDF8; Thu, 12 Oct 2017 19:08:32 +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 F264A3FC75; Thu, 12 Oct 2017 19:08:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ8Unp001696 for ; Thu, 12 Oct 2017 15:08:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id D9D415D760; Thu, 12 Oct 2017 19:08:30 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 736445EDEE; Thu, 12 Oct 2017 19:08:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5C59D80C19 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:36 +0200 Message-Id: <7888a33fab281e0b4b48a9e0563b73cad5eb4509.1507835192.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 5/9] util: storagefile: Tolerate NULL path when looking up volume in chain 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 12 Oct 2017 19:08:33 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" chain->path may be NULL e.g. for NDB drives, so the check needs to avoid dereferencing the path in such case Reviewed-by: Eric Blake --- src/util/virstoragefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 9568a5068..818a679de 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1610,7 +1610,7 @@ virStorageFileChainLookup(virStorageSourcePtr chain, break; } else { if (STREQ_NULLABLE(name, chain->relPath) || - STREQ(name, chain->path)) + STREQ_NULLABLE(name, chain->path)) break; if (nameIsFile && virStorageSourceIsLocalStorage(chain)) { --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507835323918295.5970162552461; Thu, 12 Oct 2017 12:08:43 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id C3FB1C047B97; Thu, 12 Oct 2017 19:08:42 +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 A080560639; Thu, 12 Oct 2017 19:08:42 +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 6D51E410B3; Thu, 12 Oct 2017 19:08:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ8fbg001732 for ; Thu, 12 Oct 2017 15:08:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id E50DD5D6B7; Thu, 12 Oct 2017 19:08:41 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id C65415EDE0; Thu, 12 Oct 2017 19:08:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C3FB1C047B97 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:37 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 6/9] storage: Fill in 'type' field for virStorageSource in storage driver 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 12 Oct 2017 19:08:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Storage driver uses virStorageSource only partially to store it's configuration but fully when parsing backing files of storage volumes. This patch sets the 'type' field to a value other than VIR_STORAGE_TYPE_NONE so that further patches can add a terminator element to backing chains without breaking iteration. Reviewed-by: Eric Blake --- src/conf/storage_conf.c | 4 ++++ src/storage/storage_backend_gluster.c | 2 ++ src/storage/storage_backend_logical.c | 1 + 3 files changed, 7 insertions(+) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index c35fa0e15..7c373e781 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -1109,6 +1109,8 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool, if (VIR_ALLOC(ret) < 0) return NULL; + ret->target.type =3D VIR_STORAGE_TYPE_FILE; + ret->name =3D virXPathString("string(./name)", ctxt); if (ret->name =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, "%s", @@ -1133,6 +1135,8 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool, if (VIR_ALLOC(ret->target.backingStore) < 0) goto error; + ret->target.backingStore->type =3D VIR_STORAGE_TYPE_FILE; + ret->target.backingStore->path =3D backingStore; backingStore =3D NULL; diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_ba= ckend_gluster.c index eac771b42..5eea84f16 100644 --- a/src/storage/storage_backend_gluster.c +++ b/src/storage/storage_backend_gluster.c @@ -306,6 +306,8 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlu= sterStatePtr state, if (VIR_ALLOC(vol->target.backingStore) < 0) goto cleanup; + vol->target.backingStore->type =3D VIR_STORAGE_TYPE_NETWORK; + vol->target.backingStore->path =3D meta->backingStoreRaw; if (backingFormat < 0) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_ba= ckend_logical.c index 0ad357729..1e0f04e4e 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -340,6 +340,7 @@ virStorageBackendLogicalMakeVol(char **const groups, goto cleanup; vol->target.backingStore->format =3D VIR_STORAGE_POOL_LOGICAL_LVM2; + vol->target.backingStore->type =3D VIR_STORAGE_TYPE_BLOCK; } if (!vol->key && VIR_STRDUP(vol->key, groups[2]) < 0) --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507836096956237.56395591624414; Thu, 12 Oct 2017 12:21:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED33A80F7A; Thu, 12 Oct 2017 19:21:35 +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 C12FD5D6A3; Thu, 12 Oct 2017 19:21:35 +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 5887518355D9; Thu, 12 Oct 2017 19:21:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ9HIc001843 for ; Thu, 12 Oct 2017 15:09:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 207A65EDE9; Thu, 12 Oct 2017 19:09:17 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85C7B5EDE0; Thu, 12 Oct 2017 19:08:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ED33A80F7A Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:38 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 7/9] test: set 'type' field of virStorageSource 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 12 Oct 2017 19:21:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Set the type so that the iterators will work after upcoming modification. Reviewed-by: Eric Blake --- tests/virstoragetest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index ffebd4dc1..ad4514871 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -580,6 +580,7 @@ testPathRelativePrepare(void) size_t i; for (i =3D 0; i < ARRAY_CARDINALITY(backingchain); i++) { + backingchain[i].type =3D VIR_STORAGE_TYPE_FILE; if (i < ARRAY_CARDINALITY(backingchain) - 1) backingchain[i].backingStore =3D &backingchain[i + 1]; else --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507836331600114.62869135510766; Thu, 12 Oct 2017 12:25:31 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 978CB7D0C2; Thu, 12 Oct 2017 19:25: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 79B4B17AD4; Thu, 12 Oct 2017 19:25: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 2FBB918355D9; Thu, 12 Oct 2017 19:25:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ9OXd001857 for ; Thu, 12 Oct 2017 15:09:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 91A5F5EDF5; Thu, 12 Oct 2017 19:09:24 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 226655EDF2; Thu, 12 Oct 2017 19:09:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 978CB7D0C2 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:39 +0200 Message-Id: <9b9d29a70a98c40c0f8d62c09aaa4581bd4c6f85.1507835192.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 8/9] util: storagefile: Add helpers to check presence of backing store 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 12 Oct 2017 19:25:31 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a helper that will retrun true if a virStorageSource has backing store. This will also aid in refactoring of the code further down. Reviewed-by: Eric Blake --- src/conf/domain_conf.c | 2 +- src/conf/storage_conf.c | 5 +++-- src/libvirt_private.syms | 2 ++ src/qemu/qemu_block.c | 4 ++-- src/qemu/qemu_cgroup.c | 4 ++-- src/qemu/qemu_domain.c | 6 ++--- src/qemu/qemu_driver.c | 9 ++++---- src/security/security_dac.c | 2 +- src/security/security_selinux.c | 4 ++-- src/security/virt-aa-helper.c | 2 +- src/storage/storage_backend_logical.c | 2 +- src/storage/storage_source.c | 2 +- src/storage/storage_util.c | 14 ++++++------ src/util/virstoragefile.c | 42 +++++++++++++++++++++++++++++--= ---- src/util/virstoragefile.h | 6 +++++ tests/virstoragetest.c | 2 +- 16 files changed, 73 insertions(+), 35 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 45fa57a14..3eb6c7f6f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -26607,7 +26607,7 @@ virDomainDiskDefForeachPath(virDomainDiskDefPtr dis= k, } } - for (tmp =3D disk->src; tmp; tmp =3D tmp->backingStore) { + for (tmp =3D disk->src; virStorageSourceIsBacking(tmp); tmp =3D tmp->b= ackingStore) { /* execute the callback only for local storage */ if (virStorageSourceIsLocalStorage(tmp) && tmp->path) { diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 7c373e781..f808cd291 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -1169,7 +1169,8 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool, if (virStorageSize(unit, capacity, &ret->target.capacity) < 0) goto error; } else if (!(flags & VIR_VOL_XML_PARSE_NO_CAPACITY) && - !((flags & VIR_VOL_XML_PARSE_OPT_CAPACITY) && ret->target.b= ackingStore)) { + !((flags & VIR_VOL_XML_PARSE_OPT_CAPACITY) && + virStorageSourceHasBacking(&ret->target))) { virReportError(VIR_ERR_XML_ERROR, "%s", _("missing capacity elemen= t")); goto error; } @@ -1497,7 +1498,7 @@ virStorageVolDefFormat(virStoragePoolDefPtr pool, &def->target, "target") < 0) goto cleanup; - if (def->target.backingStore && + if (virStorageSourceHasBacking(&def->target) && virStorageVolTargetDefFormat(options, &buf, def->target.backingStore, "backingStore") < 0) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 26c5ddb40..4d44c401b 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2692,7 +2692,9 @@ virStorageSourceFindByNodeName; virStorageSourceFree; virStorageSourceGetActualType; virStorageSourceGetSecurityLabelDef; +virStorageSourceHasBacking; virStorageSourceInitChainElement; +virStorageSourceIsBacking; virStorageSourceIsBlockLocal; virStorageSourceIsEmpty; virStorageSourceIsLocalStorage; diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 8d232de3e..544b4893b 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -257,7 +257,7 @@ qemuBlockDiskClearDetectedNodes(virDomainDiskDefPtr dis= k) { virStorageSourcePtr next =3D disk->src; - while (next) { + while (virStorageSourceIsBacking(next)) { VIR_FREE(next->nodeformat); VIR_FREE(next->nodestorage); @@ -287,7 +287,7 @@ qemuBlockDiskDetectNodes(virDomainDiskDefPtr disk, goto cleanup; } - while (src && entry) { + while (virStorageSourceIsBacking(src) && entry) { if (src->nodeformat || src->nodestorage) { if (STRNEQ_NULLABLE(src->nodeformat, entry->nodeformat) || STRNEQ_NULLABLE(src->nodestorage, entry->nodestorage)) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 6fc413098..0f75e22f9 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -142,7 +142,7 @@ qemuSetupDiskCgroup(virDomainObjPtr vm, virStorageSourcePtr next; bool forceReadonly =3D false; - for (next =3D disk->src; next; next =3D next->backingStore) { + for (next =3D disk->src; virStorageSourceIsBacking(next); next =3D nex= t->backingStore) { if (qemuSetupImageCgroupInternal(vm, next, forceReadonly) < 0) return -1; @@ -160,7 +160,7 @@ qemuTeardownDiskCgroup(virDomainObjPtr vm, { virStorageSourcePtr next; - for (next =3D disk->src; next; next =3D next->backingStore) { + for (next =3D disk->src; virStorageSourceIsBacking(next); next =3D nex= t->backingStore) { if (qemuTeardownImageCgroup(vm, next) < 0) return -1; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ed27a91fa..173fbca6e 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5929,7 +5929,7 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver, if (virStorageSourceIsEmpty(disk->src)) goto cleanup; - if (disk->src->backingStore) { + if (virStorageSourceHasBacking(disk->src)) { if (force_probe) virStorageSourceBackingStoreClear(disk->src); else @@ -8548,7 +8548,7 @@ qemuDomainSetupDisk(virQEMUDriverConfigPtr cfg ATTRIB= UTE_UNUSED, char *dst =3D NULL; int ret =3D -1; - for (next =3D disk->src; next; next =3D next->backingStore) { + for (next =3D disk->src; virStorageSourceIsBacking(next); next =3D nex= t->backingStore) { if (!next->path || !virStorageSourceIsLocalStorage(next)) { /* Not creating device. Just continue. */ continue; @@ -9449,7 +9449,7 @@ qemuDomainNamespaceSetupDisk(virQEMUDriverPtr driver, &ndevMountsPath) < 0) goto cleanup; - for (next =3D src; next; next =3D next->backingStore) { + for (next =3D src; virStorageSourceIsBacking(next); next =3D next->bac= kingStore) { if (virStorageSourceIsEmpty(next) || !virStorageSourceIsLocalStorage(next)) { /* Not creating device. Just continue. */ diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 0260c40ef..803df9f06 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14448,7 +14448,7 @@ qemuDomainSnapshotUpdateDiskSourcesRenumber(virStor= ageSourcePtr src) virStorageSourcePtr next; unsigned int idx =3D 1; - for (next =3D src->backingStore; next; next =3D next->backingStore) + for (next =3D src->backingStore; virStorageSourceIsBacking(next); next= =3D next->backingStore) next->id =3D idx++; } @@ -17048,7 +17048,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm, } /* clear the _SHALLOW flag if there is only one layer */ - if (!disk->src->backingStore) + if (!virStorageSourceHasBacking(disk->src)) flags &=3D ~VIR_DOMAIN_BLOCK_COPY_SHALLOW; /* unless the user provides a pre-created file, shallow copy into a raw @@ -17439,7 +17439,7 @@ qemuDomainBlockCommit(virDomainPtr dom, goto endjob; } - if (!topSource->backingStore) { + if (!virStorageSourceHasBacking(topSource)) { virReportError(VIR_ERR_INVALID_ARG, _("top '%s' in chain for '%s' has no backing file"), topSource->path, path); @@ -19887,7 +19887,8 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr driver, virStorageSourcePtr src =3D disk->src; unsigned int backing_idx =3D 0; - while (src && (backing_idx =3D=3D 0 || visitBacking)) { + while (virStorageSourceIsBacking(src) && + (backing_idx =3D=3D 0 || visitBacking)) { if (qemuDomainGetStatsOneBlock(driver, cfg, dom, record, maxpa= rams, disk, src, visited, backing_idx, stats, nodestats) < 0) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 349dbe81d..244b300a9 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -730,7 +730,7 @@ virSecurityDACSetDiskLabel(virSecurityManagerPtr mgr, { virStorageSourcePtr next; - for (next =3D disk->src; next; next =3D next->backingStore) { + for (next =3D disk->src; virStorageSourceIsBacking(next); next =3D nex= t->backingStore) { if (virSecurityDACSetImageLabel(mgr, def, next) < 0) return -1; } diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 2e3082b7a..cd3e41193 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1539,7 +1539,7 @@ virSecuritySELinuxRestoreImageLabelInt(virSecurityMan= agerPtr mgr, * be tracked in domain XML, at which point labelskip should be a * per-file attribute instead of a disk attribute. */ if (disk_seclabel && disk_seclabel->labelskip && - !src->backingStore) + !virStorageSourceHasBacking(src)) return 0; /* Don't restore labels on readonly/shared disks, because other VMs may @@ -1673,7 +1673,7 @@ virSecuritySELinuxSetDiskLabel(virSecurityManagerPtr = mgr, bool first =3D true; virStorageSourcePtr next; - for (next =3D disk->src; next; next =3D next->backingStore) { + for (next =3D disk->src; virStorageSourceIsBacking(next); next =3D nex= t->backingStore) { if (virSecuritySELinuxSetImageLabelInternal(mgr, def, next, first)= < 0) return -1; diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 95906e68a..ef1bf0136 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -942,7 +942,7 @@ get_files(vahControl * ctl) /* XXX - if we knew the qemu user:group here we could send it in * so that the open could be re-tried as that user:group. */ - if (!disk->src->backingStore) { + if (!virStorageSourceHasBacking(disk->src)) { bool probe =3D ctl->allowDiskFormatProbing; virStorageFileGetMetadata(disk->src, -1, -1, probe, false); } diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_ba= ckend_logical.c index 1e0f04e4e..a872a2f88 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -977,7 +977,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, } virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(vol->target.capacity, 1024)); - if (vol->target.backingStore) + if (virStorageSourceHasBacking(&vol->target)) virCommandAddArgList(cmd, "-s", vol->target.backingStore->path, NU= LL); else virCommandAddArg(cmd, def->source.name); diff --git a/src/storage/storage_source.c b/src/storage/storage_source.c index 864c69928..47b08f416 100644 --- a/src/storage/storage_source.c +++ b/src/storage/storage_source.c @@ -490,7 +490,7 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr sr= c, ret =3D 0; cleanup: - if (src->backingStore) + if (virStorageSourceHasBacking(src)) src->backingStore->id =3D depth; VIR_FREE(buf); virStorageFileDeinit(src); diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index a10e4590f..5252e429f 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -415,7 +415,7 @@ storageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UN= USED, goto cleanup; } - if (vol->target.backingStore) { + if (virStorageSourceHasBacking(&vol->target)) { virReportError(VIR_ERR_NO_SUPPORT, "%s", _("backing storage not supported for raw volumes")); goto cleanup; @@ -722,7 +722,7 @@ storageBackendCreatePloop(virConnectPtr conn ATTRIBUTE_= UNUSED, return -1; } - if (vol->target.backingStore !=3D NULL) { + if (virStorageSourceHasBacking(&vol->target)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("copy-on-write ploop volumes are not yet supporte= d")); return -1; @@ -1055,7 +1055,7 @@ storageBackendCreateQemuImgSetBacking(virStoragePoolO= bjPtr pool, * backing store, not really sure what use it serves though, and it * may cause issues with lvm. Untested essentially. */ - if (inputvol && inputvol->target.backingStore && + if (inputvol && virStorageSourceHasBacking(&inputvol->target) && STRNEQ_NULLABLE(inputvol->target.backingStore->path, info->backingPath)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -1230,7 +1230,7 @@ virStorageBackendCreateQemuImgCmdFromVol(virConnectPt= r conn, storageBackendCreateQemuImgSetInput(inputvol, &info) < 0) return NULL; - if (vol->target.backingStore && + if (virStorageSourceHasBacking(&vol->target) && storageBackendCreateQemuImgSetBacking(pool, vol, inputvol, &info) = < 0) return NULL; @@ -1840,7 +1840,7 @@ virStorageBackendUpdateVolInfo(virStorageVolDefPtr vo= l, openflags, readflags)) < = 0) return ret; - if (vol->target.backingStore && + if (virStorageSourceHasBacking(&vol->target) && (ret =3D storageBackendUpdateVolTargetInfo(VIR_STORAGE_VOL_FILE, vol->target.backingStore, withBlockVolFormat, @@ -2035,7 +2035,7 @@ createFileDir(virConnectPtr conn ATTRIBUTE_UNUSED, return -1; } - if (vol->target.backingStore) { + if (virStorageSourceHasBacking(&vol->target)) { virReportError(VIR_ERR_NO_SUPPORT, "%s", _("backing storage not supported for directories vo= lumes")); return -1; @@ -3561,7 +3561,7 @@ virStorageBackendRefreshVolTargetUpdate(virStorageVol= DefPtr vol) if (vol->target.format =3D=3D VIR_STORAGE_FILE_PLOOP) vol->type =3D VIR_STORAGE_VOL_PLOOP; - if (vol->target.backingStore) { + if (virStorageSourceHasBacking(&vol->target)) { ignore_value(storageBackendUpdateVolTargetInfo(VIR_STORAGE_VOL_FIL= E, vol->target.backing= Store, false, diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 818a679de..93995a331 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1292,7 +1292,7 @@ virStorageFileChainGetBroken(virStorageSourcePtr chai= n, if (!chain) return 0; - for (tmp =3D chain; tmp; tmp =3D tmp->backingStore) { + for (tmp =3D chain; virStorageSourceIsBacking(tmp); tmp =3D tmp->backi= ngStore) { /* Break when we hit end of chain; report error if we detected * a missing backing file, infinite loop, or other error */ if (!tmp->backingStore && tmp->backingStoreRaw) { @@ -1566,6 +1566,33 @@ virStorageFileParseChainIndex(const char *diskTarget, return ret; } + +/** + * virStorageSourceIsBacking: + * @src: storage source + * + * Returns true if @src is a eligible backing store structure. Useful + * for iterators. + */ +bool +virStorageSourceIsBacking(const virStorageSource *src) +{ + return !!src; +} + +/** + * virStorageSourceHasBacking: + * @src: storage source + * + * Returns true if @src has backing store/chain. + */ +bool +virStorageSourceHasBacking(const virStorageSource *src) +{ + return virStorageSourceIsBacking(src) && src->backingStore; +} + + /* Given a @chain, look for the backing store @name that is a backing file * of @startFrom (or any member of @chain if @startFrom is NULL) and return * that location within the chain. @chain must always point to the top of @@ -1594,15 +1621,16 @@ virStorageFileChainLookup(virStorageSourcePtr chain, *parent =3D NULL; if (startFrom) { - while (chain && chain !=3D startFrom->backingStore) + while (virStorageSourceIsBacking(chain) && + chain !=3D startFrom->backingStore) chain =3D chain->backingStore; *parent =3D startFrom; } - while (chain) { + while (virStorageSourceIsBacking(chain)) { if (!name && !idx) { - if (!chain->backingStore) + if (!virStorageSourceHasBacking(chain)) break; } else if (idx) { VIR_DEBUG("%u: %s", chain->id, chain->path); @@ -1640,7 +1668,7 @@ virStorageFileChainLookup(virStorageSourcePtr chain, chain =3D chain->backingStore; } - if (!chain) + if (!virStorageSourceIsBacking(chain)) goto error; return chain; @@ -3854,7 +3882,7 @@ virStorageFileGetRelativeBackingPath(virStorageSource= Ptr top, *relpath =3D NULL; - for (next =3D top; next; next =3D next->backingStore) { + for (next =3D top; virStorageSourceIsBacking(next); next =3D next->bac= kingStore) { if (!next->relPath) { ret =3D 1; goto cleanup; @@ -3973,7 +4001,7 @@ virStorageSourceFindByNodeName(virStorageSourcePtr to= p, if (idx) *idx =3D 0; - for (tmp =3D top; tmp; tmp =3D tmp->backingStore) { + for (tmp =3D top; virStorageSourceIsBacking(tmp); tmp =3D tmp->backing= Store) { if ((tmp->nodeformat && STREQ(tmp->nodeformat, nodeName)) || (tmp->nodestorage && STREQ(tmp->nodestorage, nodeName))) return tmp; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index d3bafefc3..86e60de2a 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -425,4 +425,10 @@ void virStorageSourceNetworkAssignDefaultPorts(virStorageSourcePtr src) ATTRIBUTE_NONNULL(1); +bool +virStorageSourceIsBacking(const virStorageSource *src); +bool +virStorageSourceHasBacking(const virStorageSource *src); + + #endif /* __VIR_STORAGE_FILE_H__ */ diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index ad4514871..35e97ff26 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -356,7 +356,7 @@ testStorageChain(const void *args) } elt =3D meta; - while (elt) { + while (virStorageSourceIsBacking(elt)) { char *expect =3D NULL; char *actual =3D NULL; --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 09:33:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1507836100567156.22865361211484; Thu, 12 Oct 2017 12:21:40 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 72DB27E45C; Thu, 12 Oct 2017 19:21:39 +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 0ADBF60633; Thu, 12 Oct 2017 19:21:39 +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 BDA96410B2; Thu, 12 Oct 2017 19:21:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9CJ9Vl3001870 for ; Thu, 12 Oct 2017 15:09:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5776C5EE1A; Thu, 12 Oct 2017 19:09:31 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB8D35EDE2; Thu, 12 Oct 2017 19:09:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 72DB27E45C Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Oct 2017 21:07:40 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 9/9] Terminate backing chains explicitly 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 12 Oct 2017 19:21:39 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Express a properly terminated backing chain by putting a virStorageSource of type VIR_STORAGE_TYPE_NONE in the chain. The newly used helpers simplify this greatly. The change fixes a bug as formatting an incomplete backing chain and parsing it back would end up in expressing a terminated chain since src->backingStoreRaw was not populated. By relying on the terminator object this can be now processed appropriately. Reviewed-by: Eric Blake --- src/conf/domain_conf.c | 42 ++++++++---------- src/storage/storage_source.c | 50 +++++++++++-------= ---- src/util/virstoragefile.c | 5 ++- .../qemuhotplug-base-ccw-live+ccw-virtio.xml | 1 - ...live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml | 2 - ...qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml | 1 - ...-live-with-ccw-virtio+ccw-virtio-2-explicit.xml | 2 - ...-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml | 2 - .../qemuhotplug-base-ccw-live-with-ccw-virtio.xml | 1 - ...-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml | 2 - .../qemuhotplug-base-live+disk-scsi.xml | 1 - .../qemuhotplug-base-live+disk-usb.xml | 1 - .../qemuhotplug-base-live+disk-virtio.xml | 1 - ...se-without-scsi-controller-live+disk-scsi-2.xml | 1 - ...otplug-console-compat-2-live+console-virtio.xml | 2 - .../qemuhotplug-console-compat-2-live.xml | 2 - .../qemuxml2xmlout-channel-virtio-state-active.xml | 1 - .../qemuxml2xmlout-disk-active-commit.xml | 1 - .../qemuxml2xmlout-disk-backing-chains-active.xml | 5 --- .../qemuxml2xmlout-disk-mirror-active.xml | 4 -- .../qemuxml2xmlout-disk-mirror-old.xml | 4 -- .../qemuxml2xmlout-seclabel-static-labelskip.xml | 1 - tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 1 - tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 1 - tests/sexpr2xmldata/sexpr2xml-curmem.xml | 1 - .../sexpr2xml-disk-block-shareable.xml | 1 - tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 1 - .../sexpr2xml-disk-drv-blktap-qcow.xml | 1 - .../sexpr2xml-disk-drv-blktap-raw.xml | 1 - .../sexpr2xml-disk-drv-blktap2-raw.xml | 1 - tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 1 - tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 1 - tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 2 - .../sexpr2xml-fv-serial-dev-2-ports.xml | 2 - .../sexpr2xml-fv-serial-dev-2nd-port.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 2 - .../sexpr2xml-fv-serial-tcp-telnet.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv.xml | 2 - tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 1 - tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 1 - tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 1 - tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 - tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 1 - .../sexpr2xml-pv-bootloader-cmdline.xml | 1 - tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 1 - tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 1 - tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 1 - .../sexpr2xml-pv-vfb-new-vncdisplay.xml | 1 - tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 1 - .../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 1 - tests/sexpr2xmldata/sexpr2xml-pv.xml | 1 - tests/sexpr2xmldata/sexpr2xml-vif-rate.xml | 2 - 71 files changed, 46 insertions(+), 162 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3eb6c7f6f..22f65b666 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8277,6 +8277,15 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ct= xt, goto cleanup; } + if (!(type =3D virXMLPropString(ctxt->node, "type"))) { + /* terminator does not have a type */ + if (VIR_ALLOC(backingStore) < 0) + goto cleanup; + + ret =3D 0; + goto cleanup; + } + if (VIR_ALLOC(backingStore) < 0) goto cleanup; @@ -8287,12 +8296,6 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ct= xt, goto cleanup; } - if (!(type =3D virXMLPropString(ctxt->node, "type"))) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("missing disk backing store type")); - goto cleanup; - } - backingStore->type =3D virStorageTypeFromString(type); if (backingStore->type <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, @@ -21905,24 +21908,16 @@ virDomainDiskSourceFormat(virBufferPtr buf, static int virDomainDiskBackingStoreFormat(virBufferPtr buf, - virStorageSourcePtr backingStore, - const char *backingStoreRaw) + virStorageSourcePtr backingStore) { - const char *type; const char *format; - if (!backingStore) { - if (!backingStoreRaw) - virBufferAddLit(buf, "\n"); + if (!backingStore) return 0; - } - if (!backingStore->type || - !(type =3D virStorageTypeToString(backingStore->type))) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected disk backing store type %d"), - backingStore->type); - return -1; + if (backingStore->type =3D=3D VIR_STORAGE_TYPE_NONE) { + virBufferAddLit(buf, "\n"); + return 0; } if (backingStore->format <=3D 0 || @@ -21933,7 +21928,8 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf, return -1; } - virBufferAsprintf(buf, "type)); if (backingStore->id !=3D 0) virBufferAsprintf(buf, " index=3D'%u'", backingStore->id); virBufferAddLit(buf, ">\n"); @@ -21943,8 +21939,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf, /* We currently don't output seclabels for backing chain element */ if (virDomainDiskSourceFormatInternal(buf, backingStore, 0, 0, true) <= 0 || virDomainDiskBackingStoreFormat(buf, - backingStore->backingStore, - backingStore->backingStoreRaw) < 0) + backingStore->backingStore) < 0) return -1; virBufferAdjustIndent(buf, -2); @@ -22079,8 +22074,7 @@ virDomainDiskDefFormat(virBufferPtr buf, /* Don't format backingStore to inactive XMLs until the code for * persistent storage of backing chains is ready. */ if (!(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE) && - virDomainDiskBackingStoreFormat(buf, def->src->backingStore, - def->src->backingStoreRaw) < 0) + virDomainDiskBackingStoreFormat(buf, def->src->backingStore) < 0) return -1; virBufferEscapeString(buf, "\n", def->doma= in_name); diff --git a/src/storage/storage_source.c b/src/storage/storage_source.c index 47b08f416..419fa3d43 100644 --- a/src/storage/storage_source.c +++ b/src/storage/storage_source.c @@ -456,33 +456,33 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr = src, &backingFormat) < 0) goto cleanup; - /* check whether we need to go deeper */ - if (!src->backingStoreRaw) { - ret =3D 0; - goto cleanup; - } - - if (!(backingStore =3D virStorageSourceNewFromBacking(src))) - goto cleanup; - - if (backingFormat =3D=3D VIR_STORAGE_FILE_AUTO && !allow_probe) - backingStore->format =3D VIR_STORAGE_FILE_RAW; - else if (backingFormat =3D=3D VIR_STORAGE_FILE_AUTO_SAFE) - backingStore->format =3D VIR_STORAGE_FILE_AUTO; - else - backingStore->format =3D backingFormat; - - if ((ret =3D virStorageFileGetMetadataRecurse(backingStore, parent, - uid, gid, - allow_probe, report_broken, - cycle, depth + 1)) < 0) { - if (report_broken) + if (src->backingStoreRaw) { + if (!(backingStore =3D virStorageSourceNewFromBacking(src))) goto cleanup; - /* if we fail somewhere midway, just accept and return a - * broken chain */ - ret =3D 0; - goto cleanup; + if (backingFormat =3D=3D VIR_STORAGE_FILE_AUTO && !allow_probe) + backingStore->format =3D VIR_STORAGE_FILE_RAW; + else if (backingFormat =3D=3D VIR_STORAGE_FILE_AUTO_SAFE) + backingStore->format =3D VIR_STORAGE_FILE_AUTO; + else + backingStore->format =3D backingFormat; + + if ((ret =3D virStorageFileGetMetadataRecurse(backingStore, parent, + uid, gid, + allow_probe, report_br= oken, + cycle, depth + 1)) < 0= ) { + if (report_broken) + goto cleanup; + + /* if we fail somewhere midway, just accept and return a + * broken chain */ + ret =3D 0; + goto cleanup; + } + } else { + /* add terminator */ + if (VIR_ALLOC(backingStore) < 0) + goto cleanup; } src->backingStore =3D backingStore; diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 93995a331..59229631b 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1577,7 +1577,7 @@ virStorageFileParseChainIndex(const char *diskTarget, bool virStorageSourceIsBacking(const virStorageSource *src) { - return !!src; + return src && src->type !=3D VIR_STORAGE_TYPE_NONE; } /** @@ -1589,7 +1589,8 @@ virStorageSourceIsBacking(const virStorageSource *src) bool virStorageSourceHasBacking(const virStorageSource *src) { - return virStorageSourceIsBacking(src) && src->backingStore; + return virStorageSourceIsBacking(src) && src->backingStore && + src->backingStore->type !=3D VIR_STORAGE_TYPE_NONE; } diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-vir= tio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio= .xml index cd03d0e09..0fa8d036b 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-= ccw-virtio+ccw-virtio-1-reverse.xml b/tests/qemuhotplugtestdomains/qemuhotp= lug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml index 7be75f977..135427fff 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-vir= tio+ccw-virtio-1-reverse.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-vir= tio+ccw-virtio-1-reverse.xml @@ -22,7 +22,6 @@ - @@ -32,7 +31,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-= ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-wit= h-2-ccw-virtio.xml index a83f1b5d7..e17c4e43b 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-vir= tio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-vir= tio.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-cc= w-virtio+ccw-virtio-2-explicit.xml b/tests/qemuhotplugtestdomains/qemuhotpl= ug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml index 0a51993cc..326d312fa 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o+ccw-virtio-2-explicit.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o+ccw-virtio-2-explicit.xml @@ -22,7 +22,6 @@ - @@ -32,7 +31,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-cc= w-virtio+ccw-virtio-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-c= cw-live-with-ccw-virtio+ccw-virtio-2.xml index 0a51993cc..326d312fa 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o+ccw-virtio-2.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o+ccw-virtio-2.xml @@ -22,7 +22,6 @@ - @@ -32,7 +31,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-cc= w-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-= ccw-virtio.xml index cd03d0e09..0fa8d036b 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-w= wn+disk-scsi-duplicate-wwn.xml b/tests/qemuhotplugtestdomains/qemuhotplug-b= ase-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml index 4c3ea3202..9482b6794 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk= -scsi-duplicate-wwn.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk= -scsi-duplicate-wwn.xml @@ -22,7 +22,6 @@ - @@ -33,7 +32,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.x= ml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml index 493a615fd..a6dbf0b1b 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xm= l b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml index 3609819ea..6ccb88f14 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio= .xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml index b88b220e3..b97c0b41e 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-con= troller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-bas= e-without-scsi-controller-live+disk-scsi-2.xml index c12d18f71..6422e1640 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller= -live+disk-scsi-2.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller= -live+disk-scsi-2.xml @@ -22,7 +22,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live= +console-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-console-comp= at-2-live+console-virtio.xml index 7ca36d57b..4e1dd49c2 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+consol= e-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+consol= e-virtio.xml @@ -29,7 +29,6 @@ -
@@ -37,7 +36,6 @@ - diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live= .xml b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml index f300940a3..c56d13ef4 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml @@ -29,7 +29,6 @@ -
@@ -37,7 +36,6 @@ - diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-state-a= ctive.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-state-ac= tive.xml index 8cddbeff7..7d93fc0c0 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-state-active.x= ml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-state-active.x= ml @@ -16,7 +16,6 @@ /usr/bin/qemu-system-i686 -
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-active-commit.xml= b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-active-commit.xml index cc26af109..5766e4aea 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-active-commit.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-active-commit.xml @@ -20,7 +20,6 @@ - diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-backing-chains-ac= tive.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-backing-chains-acti= ve.xml index 83d47df56..828defcc2 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-backing-chains-active.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-backing-chains-active.xml @@ -22,7 +22,6 @@ -
@@ -50,7 +49,6 @@ - @@ -65,7 +63,6 @@ -
@@ -82,7 +79,6 @@ -
@@ -90,7 +86,6 @@ -
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-active.xml= b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-active.xml index c1e8a33ec..252bde338 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-active.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-active.xml @@ -16,7 +16,6 @@ /usr/bin/qemu-system-i686 - @@ -25,14 +24,12 @@ -
- @@ -42,7 +39,6 @@ - diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml b/= tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml index e390bc02f..f4bd39a58 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml @@ -16,7 +16,6 @@ /usr/bin/qemu-system-i686 - @@ -25,14 +24,12 @@ -
- @@ -42,7 +39,6 @@ -
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-static-labels= kip.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-static-labelskip= .xml index d37b950cb..91f573db7 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-static-labelskip.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-static-labelskip.xml @@ -18,7 +18,6 @@ -
diff --git a/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml b/tests/sexpr2xmld= ata/sexpr2xml-boot-grub.xml index 85cff4e8b..b9a8716b2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml +++ b/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml @@ -17,7 +17,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml b/tests/sexpr2= xmldata/sexpr2xml-bridge-ipaddr.xml index a04496f11..a8f804423 100644 --- a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml +++ b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-curmem.xml b/tests/sexpr2xmldata= /sexpr2xml-curmem.xml index 601749e2b..a976986a1 100644 --- a/tests/sexpr2xmldata/sexpr2xml-curmem.xml +++ b/tests/sexpr2xmldata/sexpr2xml-curmem.xml @@ -19,7 +19,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml b/tests= /sexpr2xmldata/sexpr2xml-disk-block-shareable.xml index a3295a056..9f757efa2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml @@ -16,7 +16,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block.xml b/tests/sexpr2xml= data/sexpr2xml-disk-block.xml index 30dee466e..56d6db5a5 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-block.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-block.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml b/tests= /sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml index 12b65d6f5..80f6dd205 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml b/tests/= sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml index f7d48f9e5..71e7c40b6 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml b/tests= /sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml index 497413c6e..bd244bbc3 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-file.xml b/tests/sexpr2xmld= ata/sexpr2xml-disk-file.xml index 18b3dbde2..c624fe31c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-file.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-file.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xm= ldata/sexpr2xml-fv-autoport.xml index e8ae46c8a..5d4976fb3 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexp= r2xmldata/sexpr2xml-fv-empty-kernel.xml index 0adac3420..57b60ec78 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2= xmldata/sexpr2xml-fv-force-hpet.xml index 4f02e80c3..8266d10e0 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml @@ -23,14 +23,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexp= r2xmldata/sexpr2xml-fv-force-nohpet.xml index caa10d9ff..0b360446f 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml @@ -23,14 +23,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml b/tests/sexpr2xmld= ata/sexpr2xml-fv-kernel.xml index ce6e97a25..c638d8c72 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml @@ -19,7 +19,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2x= mldata/sexpr2xml-fv-localtime.xml index 189215ab4..40866d392 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexp= r2xmldata/sexpr2xml-fv-net-netfront.xml index 386726aca..ed53462ab 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexp= r2xmldata/sexpr2xml-fv-parallel-tcp.xml index 9fdc16f17..0fbce74c3 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/test= s/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml index 50dac3bd1..bf2518465 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tes= ts/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml index f0c9c4f7b..60e9dd819 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr= 2xmldata/sexpr2xml-fv-serial-file.xml index 127de7d4f..6dfc32f01 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr= 2xmldata/sexpr2xml-fv-serial-null.xml index 2b4c0c954..274e3c36c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr= 2xmldata/sexpr2xml-fv-serial-pipe.xml index 2080a4dfc..fe251cb5f 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2= xmldata/sexpr2xml-fv-serial-pty.xml index c51a79af6..258d76c45 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexp= r2xmldata/sexpr2xml-fv-serial-stdio.xml index 6226a2844..768a4253b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests= /sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml index 071645f66..6d76e5752 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2= xmldata/sexpr2xml-fv-serial-tcp.xml index 3eda5137d..9b7edd110 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2= xmldata/sexpr2xml-fv-serial-udp.xml index 35b6f8462..65c4ffcbb 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr= 2xmldata/sexpr2xml-fv-serial-unix.xml index fe5bf1108..2c75df14d 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2x= mldata/sexpr2xml-fv-sound-all.xml index 65ba50603..cb5e9443c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmlda= ta/sexpr2xml-fv-sound.xml index 65ba50603..cb5e9443c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xm= ldata/sexpr2xml-fv-usbmouse.xml index f034bc19a..6de380ba0 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2x= mldata/sexpr2xml-fv-usbtablet.xml index ab350c0c0..46628dff4 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata= /sexpr2xml-fv-utc.xml index e49854f08..f75eac3a7 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/= sexpr2xml-fv-v2.xml index e49854f08..f75eac3a7 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sex= pr2xml-fv.xml index e49854f08..f75eac3a7 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml @@ -21,14 +21,12 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml b/tests/sexpr2xm= ldata/sexpr2xml-net-bridged.xml index 33961fc95..b680fd8aa 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml b/tests/sexpr2xmld= ata/sexpr2xml-net-e1000.xml index 66afbfbfd..bd9f68048 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-net-routed.xml b/tests/sexpr2xml= data/sexpr2xml-net-routed.xml index 9544954c4..f3cd1a7e7 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-routed.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-routed.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexp= r2xmldata/sexpr2xml-no-source-cdrom.xml index 17018952e..8a0c28b49 100644 --- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml +++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml @@ -23,12 +23,10 @@ -
-
diff --git a/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml b/tests/sexpr2xmlda= ta/sexpr2xml-pci-devs.xml index 11bd4c60b..ea8e5a5fa 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml b/test= s/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml index fafffffb0..f830742fc 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml b/tests/sexpr2= xmldata/sexpr2xml-pv-bootloader.xml index 96a50da09..131e04d50 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml @@ -17,7 +17,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml b/tests/sexpr2x= mldata/sexpr2xml-pv-localtime.xml index 6dba41613..c1d702d9a 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml b/tests/sexpr2xmlda= ta/sexpr2xml-pv-vcpus.xml index 971323493..968697802 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml b/test= s/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml index 72fec2559..a7553a520 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml b/tests/sexpr2xml= data/sexpr2xml-pv-vfb-new.xml index 0fd7a889d..6172dc336 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml b/tests/se= xpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml index 06e7280bc..8062082c1 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml @@ -17,7 +17,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-pv.xml b/tests/sexpr2xmldata/sex= pr2xml-pv.xml index 18b3dbde2..c624fe31c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv.xml @@ -18,7 +18,6 @@ - diff --git a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml b/tests/sexpr2xmlda= ta/sexpr2xml-vif-rate.xml index bfcd7c367..3b04ae23c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml +++ b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml @@ -21,14 +21,12 @@ -
-
--=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list