From nobody Thu May 15 10:07:38 2025 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 1511526108502562.8210842142844; Fri, 24 Nov 2017 04:21:48 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C45A8C02738B; Fri, 24 Nov 2017 12:21:46 +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 A01876064E; Fri, 24 Nov 2017 12:21:46 +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 588321800BDC; Fri, 24 Nov 2017 12:21:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAOCLXgW007328 for ; Fri, 24 Nov 2017 07:21:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id CDD7C5C269; Fri, 24 Nov 2017 12:21:33 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BC115C88A; Fri, 24 Nov 2017 12:21:33 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 24 Nov 2017 13:21:03 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 3/3] qemu: domain: Fix backing store terminator for non-backing local files 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 24 Nov 2017 12:21:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Raw local files do not pass through the backing store detector and thus the code did not allocate the required backing store terminator for them. Previously the terminating element would be formatted into the XML since the default values used for the metadata allowed that. This is a regression since a693fdba0111ff which was not detected in the review. This patch also reverts all the changes in the test files. Reviewed-by: John Ferlan --- src/qemu/qemu_domain.c | 5 += ++++ .../qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml | 1 + ...uhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml | 2 ++ .../qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml | 1 + ...muhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml | 1 + .../qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml | 1 + .../qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml | 1 + tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml | 1 + tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml | 1 + tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml | 1 + .../qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml | 1 + 11 files changed, 16 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0cdcb11c37..82671d99c6 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6167,6 +6167,11 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver, goto cleanup; } + /* terminate the chain for such images as the code below would do = */ + if (!src->backingStore && + VIR_ALLOC(src->backingStore) < 0) + goto cleanup; + ret =3D 0; goto cleanup; } diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-vir= tio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio= .xml index 0fa8d036b9..cd03d0e09b 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml @@ -22,6 +22,7 @@ + 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 135427fff5..7be75f977b 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,6 +22,7 @@ + @@ -31,6 +32,7 @@ + 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 e17c4e43b2..a83f1b5d73 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,6 +22,7 @@ + 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 326d312fa9..3e90207519 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,6 +22,7 @@ + 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 326d312fa9..3e90207519 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,6 +22,7 @@ + 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 16caeb3542..4c3ea3202b 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 @@ -33,6 +33,7 @@ + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.x= ml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml index a6dbf0b1bd..493a615fd3 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml @@ -22,6 +22,7 @@ + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xm= l b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml index 6ccb88f140..3609819ea3 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml @@ -22,6 +22,7 @@ + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio= .xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml index b97c0b41e2..b88b220e33 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml @@ -22,6 +22,7 @@ + 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 6422e1640d..c12d18f716 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,6 +22,7 @@ + --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list