From nobody Mon Feb 9 09:07:53 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=1570485232; cv=none; d=zoho.com; s=zohoarc; b=JgRDaM/FhS7czOkLGAVFMvEl7ZHAvF2hcBw7y610TTEMkB1cVxd7BMHyl+eI0yagdOBGEEtUHoMsdjvJs5EfMx6Xjmw9fugfNMcTL93RVnmFp5FOmzHoXPVNBhz+m+SCSewyuTu/ZGSPzpgYrN9MIheorHu/8TE8YHdYUr/qnps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570485232; 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=xej1xLcS4uGqhQQois+fdJyo3DobfbQL5u4d3PVMb+w=; b=BMpXDK3vLUcy+BhjGv7mBeVZYwrUKgqA6n7JTJgcbDxSx5hmigGHDeoHRiDo1FCYbjYns2/LQiL9J/IlzkufWCsjB64mSglyMj7L4Lro0MXSe3rjuCPqwYKhnvE/KOOcIJ+AFU4ZW4G8tzUcpf4qYYp1bnCsTMQI7yeeACMg3V4= 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 1570485232399448.9190354057532; Mon, 7 Oct 2019 14:53:52 -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 C1D3D51EE6; Mon, 7 Oct 2019 21:53:49 +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 99F645D71C; Mon, 7 Oct 2019 21:53:49 +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 471614EE97; Mon, 7 Oct 2019 21:53:49 +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 x97LoOS7015037 for ; Mon, 7 Oct 2019 17:50:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 92ED55C224; Mon, 7 Oct 2019 21:50:24 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-123-156.rdu2.redhat.com [10.10.123.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2421B5C223; Mon, 7 Oct 2019 21:49:58 +0000 (UTC) From: Cole Robinson To: libvir-list@redhat.com Date: Mon, 7 Oct 2019 17:49:32 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 18/30] storagefile: Add externalDataStore member 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.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]); Mon, 07 Oct 2019 21:53:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Add the plumbing to track a externalDataStoreRaw as a virStorageSource Signed-off-by: Cole Robinson Reviewed-by: Daniel Henrique Barboza --- src/util/virstoragefile.c | 9 +++++++++ src/util/virstoragefile.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 7ae6719dd6..ce669b6e0b 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2339,6 +2339,12 @@ virStorageSourceCopy(const virStorageSource *src, return NULL; } =20 + if (src->externalDataStore) { + if (!(def->externalDataStore =3D virStorageSourceCopy(src->externa= lDataStore, + true))) + return NULL; + } + VIR_STEAL_PTR(ret, def); return ret; } @@ -2560,6 +2566,9 @@ virStorageSourceClear(virStorageSourcePtr def) VIR_FREE(def->timestamps); VIR_FREE(def->externalDataStoreRaw); =20 + virObjectUnref(def->externalDataStore); + def->externalDataStore =3D NULL; + virStorageNetHostDefFree(def->nhosts, def->hosts); virStorageAuthDefFree(def->auth); virObjectUnref(def->privateData); diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index bbff511657..d84dad052d 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -292,6 +292,9 @@ struct _virStorageSource { /* backing chain of the storage source */ virStorageSourcePtr backingStore; =20 + /* external data store storage source */ + virStorageSourcePtr externalDataStore; + /* metadata for storage driver access to remote and local volumes */ virStorageDriverDataPtr drv; =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list