From nobody Sun Feb 8 23:41:54 2026 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1567519738; cv=none; d=zoho.com; s=zohoarc; b=CnEBW/eTfTp/1Jz2IODv+WkVvzCj6bEQwnFrYWBRoDuwbF01VZEfCeSdMQ0h+DKBXTDBLgV6FdG4RLJ9UFJur99Jx8wHAxl6eecmhoPwS3Nev+JA8WPFiq80ZnAM+heT62SoVndsvy7TpOaCw+aID3bFMArsKk9xb1O9Nwwfe7E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567519738; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=dF+BSf1BMrAEnvX0AMmTJgfzuoNjOSeQtZf4FZZyktg=; b=DiLk4CCsyIixI8/y5cWgDbYwE+rtub5lZYRFnZEQ0sNk9WyTqbZuKQrxZZJT15TAqgzfPrFpjnsuN7mNw+sOik/y3eOqYZQHeMWGRowVz1TOqVcD+qZ6hbo1A5iUiGghMc1Ukl6tP7+taeTW1OzbUrEFFKMPR2g65xPg51flxkY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1567519738769129.84219060312375; Tue, 3 Sep 2019 07:08:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 648A26CFC3; Tue, 3 Sep 2019 14:08:57 +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 3D0F9194BB; Tue, 3 Sep 2019 14:08:57 +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 E87F2180BAA0; Tue, 3 Sep 2019 14:08:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x83E8LPX009598 for ; Tue, 3 Sep 2019 10:08:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id DC58A100197A; Tue, 3 Sep 2019 14:08:21 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64BD910016EB for ; Tue, 3 Sep 2019 14:08:21 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 3 Sep 2019 16:08:01 +0200 Message-Id: <05f4a5dd752d64ab01b1176d9c7d79177d4a3862.1567519340.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 08/18] qemu: Explicitly pass backing store to qemuBuildStorageSourceChainAttachPrepareBlockdevTop 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 03 Sep 2019 14:08:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In some cases we'll need to pass in a backing store which is not recorded as the backing store of @src. Export backingStore as variable and fix all callers to pass in the backing store. No semantic changes for now. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 12 +++++++++--- src/qemu/qemu_command.h | 1 + src/qemu/qemu_driver.c | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fa8bf39359..9cd46e8ea7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10723,11 +10723,12 @@ qemuBuildStorageSourceChainAttachPrepareDrive(vir= DomainDiskDefPtr disk, static int qemuBuildStorageSourceChainAttachPrepareBlockdevOne(qemuBlockStorageSource= ChainData *data, virStorageSourcePtr sr= c, + virStorageSourcePtr ba= ckingStore, virQEMUCapsPtr qemuCap= s) { VIR_AUTOPTR(qemuBlockStorageSourceAttachData) elem =3D NULL; - if (!(elem =3D qemuBlockStorageSourceAttachPrepareBlockdev(src, src->b= ackingStore, true))) + if (!(elem =3D qemuBlockStorageSourceAttachPrepareBlockdev(src, backin= gStore, true))) return -1; if (qemuBuildStorageSourceAttachPrepareCommon(src, elem, qemuCaps) < 0) @@ -10759,7 +10760,9 @@ qemuBuildStorageSourceChainAttachPrepareBlockdev(vi= rStorageSourcePtr top, return NULL; for (n =3D top; virStorageSourceIsBacking(n); n =3D n->backingStore) { - if (qemuBuildStorageSourceChainAttachPrepareBlockdevOne(data, n, q= emuCaps) < 0) + if (qemuBuildStorageSourceChainAttachPrepareBlockdevOne(data, n, + n->backing= Store, + qemuCaps) = < 0) return NULL; } @@ -10770,6 +10773,7 @@ qemuBuildStorageSourceChainAttachPrepareBlockdev(vi= rStorageSourcePtr top, /** * qemuBuildStorageSourceChainAttachPrepareBlockdevTop: * @top: storage source chain + * @backingStore: a storage source to use as backing of @top * @qemuCaps: qemu capabilities object * * Prepares qemuBlockStorageSourceChainDataPtr for attaching of @top image= only @@ -10777,6 +10781,7 @@ qemuBuildStorageSourceChainAttachPrepareBlockdev(vi= rStorageSourcePtr top, */ qemuBlockStorageSourceChainDataPtr qemuBuildStorageSourceChainAttachPrepareBlockdevTop(virStorageSourcePtr to= p, + virStorageSourcePtr ba= ckingStore, virQEMUCapsPtr qemuCap= s) { VIR_AUTOPTR(qemuBlockStorageSourceChainData) data =3D NULL; @@ -10784,7 +10789,8 @@ qemuBuildStorageSourceChainAttachPrepareBlockdevTop= (virStorageSourcePtr top, if (VIR_ALLOC(data) < 0) return NULL; - if (qemuBuildStorageSourceChainAttachPrepareBlockdevOne(data, top, qem= uCaps) < 0) + if (qemuBuildStorageSourceChainAttachPrepareBlockdevOne(data, top, bac= kingStore, + qemuCaps) < 0) return NULL; VIR_RETURN_PTR(data); diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 6f97e7bc0c..60f9843b03 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -119,6 +119,7 @@ qemuBuildStorageSourceChainAttachPrepareBlockdev(virSto= rageSourcePtr top, qemuBlockStorageSourceChainDataPtr qemuBuildStorageSourceChainAttachPrepareBlockdevTop(virStorageSourcePtr to= p, + virStorageSourcePtr ba= ckingStore, virQEMUCapsPtr qemuCap= s); char diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 78f5471b79..df677d8f4c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18547,6 +18547,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm, } if (!(crdata =3D qemuBuildStorageSourceChainAttachPrepareBlock= devTop(mirror, + = mirror->backingStore, = priv->qemuCaps))) goto endjob; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list