From nobody Sun Feb 8 08:13:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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=1607961392; cv=none; d=zohomail.com; s=zohoarc; b=Npz5RSC2ePZ/CtwFBwOtFWe5PA+VowjGuV5/RI+qE8l7KUCVakQJNFHqNXM8BfzMeIx3oyT+7QQ9BXaJEAKvYmmYX2pYw8b+JElZlih/geojiKwsl5LZp//aYBCjg2fwwxNZQKvuhig0Zx3FvakmIiGFB/Ulkd7dahuM0aacenI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607961392; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=buEgVe4Vtdn+QA4XgVVDDIK5lJOklqv/wc4wUYxotLI=; b=Dpcd0CjviiQjyzTABetdt2EIZFje2sm3Ts6Xk9v4/iNlbsDFalcORS74UZ18/gmJ6okDGoVfC3B7VVSZfa9KbV439C1rKFy6NHiX4N4pdkoTKN4GoP6zlSB5LZymu3Z0uPSjHlNF1M+ftD6Tmbe6vkTQDIKpeHnJne4eneLmIBE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1607961392471354.5923884799463; Mon, 14 Dec 2020 07:56:32 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-22-RlRs-dE9NZG7aw_nxSxbBA-1; Mon, 14 Dec 2020 10:56:27 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3129EE75A; Mon, 14 Dec 2020 15:56:22 +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 0A5FC10016FE; Mon, 14 Dec 2020 15:56:22 +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 C59AA1809CA6; Mon, 14 Dec 2020 15:56: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 0BEFtrue028601 for ; Mon, 14 Dec 2020 10:55:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id 38AB25D6D5; Mon, 14 Dec 2020 15:55:53 +0000 (UTC) Received: from antique-work.lan (unknown [10.40.194.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DBD462467 for ; Mon, 14 Dec 2020 15:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607961390; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=buEgVe4Vtdn+QA4XgVVDDIK5lJOklqv/wc4wUYxotLI=; b=TFlzr3M9fkgNhl2UvhG9kKJP30mIcHEh5eFEz95t8VRxxiIvxVkWspxpBAxKx2i4lhnfBd 58BQwjchGLaEXB3IX941hSw05INLupN/vor7Ebmm8wW33cq0NrRXxtYk8Z4JECjLncAn+q ADaYRip5OKkJ8vO2VMtSMSPvO0Hj25k= X-MC-Unique: RlRs-dE9NZG7aw_nxSxbBA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 11/17] virstoragefile: change virStorageSource->drv to void pointer Date: Mon, 14 Dec 2020 16:55:31 +0100 Message-Id: <19329efa29a0ca808d04d241ad166791caa4bc0c.1607960951.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This will allow following patches to move virStorageSource into conf directory and virStorageDriverData into a new storage_file directory. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/storage/storage_file_fs.c | 21 +++-- src/storage/storage_file_gluster.c | 31 +++++--- src/util/virstoragefile.c | 118 +++++++++++++++++++++-------- src/util/virstoragefile.h | 5 +- src/util/virstoragefilebackend.h | 2 + 5 files changed, 122 insertions(+), 55 deletions(-) diff --git a/src/storage/storage_file_fs.c b/src/storage/storage_file_fs.c index b379a8ca8e..5a44ef8c2d 100644 --- a/src/storage/storage_file_fs.c +++ b/src/storage/storage_file_fs.c @@ -51,7 +51,8 @@ struct _virStorageFileBackendFsPriv { static void virStorageFileBackendFileDeinit(virStorageSourcePtr src) { - virStorageFileBackendFsPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendFsPrivPtr priv =3D drv->priv; =20 VIR_DEBUG("deinitializing FS storage file %p (%s:%s)", src, virStorageTypeToString(virStorageSourceGetActualType(src)), @@ -66,16 +67,17 @@ virStorageFileBackendFileDeinit(virStorageSourcePtr src) static int virStorageFileBackendFileInit(virStorageSourcePtr src) { + virStorageDriverDataPtr drv =3D src->drv; virStorageFileBackendFsPrivPtr priv =3D NULL; =20 VIR_DEBUG("initializing FS storage file %p (%s:%s)[%u:%u]", src, virStorageTypeToString(virStorageSourceGetActualType(src)), src->path, - (unsigned int)src->drv->uid, (unsigned int)src->drv->gid); + (unsigned int)drv->uid, (unsigned int)drv->gid); =20 priv =3D g_new0(virStorageFileBackendFsPriv, 1); =20 - src->drv->priv =3D priv; + drv->priv =3D priv; =20 return 0; } @@ -84,10 +86,11 @@ virStorageFileBackendFileInit(virStorageSourcePtr src) static int virStorageFileBackendFileCreate(virStorageSourcePtr src) { + virStorageDriverDataPtr drv =3D src->drv; VIR_AUTOCLOSE fd =3D -1; =20 if ((fd =3D virFileOpenAs(src->path, O_WRONLY | O_TRUNC | O_CREAT, S_I= RUSR | S_IWUSR, - src->drv->uid, src->drv->gid, 0)) < 0) { + drv->uid, drv->gid, 0)) < 0) { errno =3D -fd; return -1; } @@ -117,11 +120,12 @@ virStorageFileBackendFileRead(virStorageSourcePtr src, size_t len, char **buf) { + virStorageDriverDataPtr drv =3D src->drv; ssize_t ret =3D -1; VIR_AUTOCLOSE fd =3D -1; =20 if ((fd =3D virFileOpenAs(src->path, O_RDONLY, 0, - src->drv->uid, src->drv->gid, 0)) < 0) { + drv->uid, drv->gid, 0)) < 0) { virReportSystemError(-fd, _("Failed to open file '%s'"), src->path); return -1; @@ -146,7 +150,8 @@ virStorageFileBackendFileRead(virStorageSourcePtr src, static const char * virStorageFileBackendFileGetUniqueIdentifier(virStorageSourcePtr src) { - virStorageFileBackendFsPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendFsPrivPtr priv =3D drv->priv; =20 if (!priv->canonpath) { if (!(priv->canonpath =3D virFileCanonicalizePath(src->path))) { @@ -164,8 +169,10 @@ static int virStorageFileBackendFileAccess(virStorageSourcePtr src, int mode) { + virStorageDriverDataPtr drv =3D src->drv; + return virFileAccessibleAs(src->path, mode, - src->drv->uid, src->drv->gid); + drv->uid, drv->gid); } =20 =20 diff --git a/src/storage/storage_file_gluster.c b/src/storage/storage_file_= gluster.c index c84af8a4e8..e26dfdfd99 100644 --- a/src/storage/storage_file_gluster.c +++ b/src/storage/storage_file_gluster.c @@ -46,7 +46,8 @@ struct _virStorageFileBackendGlusterPriv { static void virStorageFileBackendGlusterDeinit(virStorageSourcePtr src) { - virStorageFileBackendGlusterPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendGlusterPrivPtr priv =3D drv->priv; =20 VIR_DEBUG("deinitializing gluster storage file %p (gluster://%s:%u/%s%= s)", src, src->hosts->name, src->hosts->port, src->volume, src->p= ath); @@ -56,7 +57,7 @@ virStorageFileBackendGlusterDeinit(virStorageSourcePtr sr= c) VIR_FREE(priv->canonpath); =20 VIR_FREE(priv); - src->drv->priv =3D NULL; + drv->priv =3D NULL; } =20 static int @@ -99,6 +100,7 @@ virStorageFileBackendGlusterInitServer(virStorageFileBac= kendGlusterPrivPtr priv, static int virStorageFileBackendGlusterInit(virStorageSourcePtr src) { + virStorageDriverDataPtr drv =3D src->drv; virStorageFileBackendGlusterPrivPtr priv =3D NULL; size_t i; =20 @@ -114,7 +116,7 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr sr= c) VIR_DEBUG("initializing gluster storage file %p " "(priv=3D'%p' volume=3D'%s' path=3D'%s') as [%u:%u]", src, priv, src->volume, src->path, - (unsigned int)src->drv->uid, (unsigned int)src->drv->gid); + (unsigned int)drv->uid, (unsigned int)drv->gid); =20 if (!(priv->vol =3D glfs_new(src->volume))) { virReportOOMError(); @@ -133,7 +135,7 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr sr= c) goto error; } =20 - src->drv->priv =3D priv; + drv->priv =3D priv; =20 return 0; =20 @@ -149,7 +151,8 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr sr= c) static int virStorageFileBackendGlusterCreate(virStorageSourcePtr src) { - virStorageFileBackendGlusterPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendGlusterPrivPtr priv =3D drv->priv; glfs_fd_t *fd =3D NULL; =20 if (!(fd =3D glfs_creat(priv->vol, src->path, @@ -164,7 +167,8 @@ virStorageFileBackendGlusterCreate(virStorageSourcePtr = src) static int virStorageFileBackendGlusterUnlink(virStorageSourcePtr src) { - virStorageFileBackendGlusterPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendGlusterPrivPtr priv =3D drv->priv; =20 return glfs_unlink(priv->vol, src->path); } @@ -174,7 +178,8 @@ static int virStorageFileBackendGlusterStat(virStorageSourcePtr src, struct stat *st) { - virStorageFileBackendGlusterPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendGlusterPrivPtr priv =3D drv->priv; =20 return glfs_stat(priv->vol, src->path, st); } @@ -186,7 +191,8 @@ virStorageFileBackendGlusterRead(virStorageSourcePtr sr= c, size_t len, char **buf) { - virStorageFileBackendGlusterPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendGlusterPrivPtr priv =3D drv->priv; glfs_fd_t *fd =3D NULL; ssize_t ret =3D -1; char *s; @@ -241,7 +247,8 @@ static int virStorageFileBackendGlusterAccess(virStorageSourcePtr src, int mode) { - virStorageFileBackendGlusterPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendGlusterPrivPtr priv =3D drv->priv; =20 return glfs_access(priv->vol, src->path, mode); } @@ -294,7 +301,8 @@ virStorageFileBackendGlusterReadlinkCallback(const char= *path, static const char * virStorageFileBackendGlusterGetUniqueIdentifier(virStorageSourcePtr src) { - virStorageFileBackendGlusterPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendGlusterPrivPtr priv =3D drv->priv; g_autofree char *filePath =3D NULL; =20 if (priv->canonpath) @@ -320,7 +328,8 @@ virStorageFileBackendGlusterChown(const virStorageSourc= e *src, uid_t uid, gid_t gid) { - virStorageFileBackendGlusterPrivPtr priv =3D src->drv->priv; + virStorageDriverDataPtr drv =3D src->drv; + virStorageFileBackendGlusterPrivPtr priv =3D drv->priv; =20 return glfs_chown(priv->vol, src->path, uid, gid); } diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 6ced28762a..524204a56c 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4521,7 +4521,8 @@ virStorageFileGetBackendForSupportCheck(const virStor= ageSource *src, } =20 if (src->drv) { - *backend =3D src->drv->backend; + virStorageDriverDataPtr drv =3D src->drv; + *backend =3D drv->backend; return 1; } =20 @@ -4617,12 +4618,16 @@ virStorageFileSupportsCreate(const virStorageSource= *src) void virStorageFileDeinit(virStorageSourcePtr src) { + virStorageDriverDataPtr drv =3D NULL; + if (!virStorageFileIsInitialized(src)) return; =20 - if (src->drv->backend && - src->drv->backend->backendDeinit) - src->drv->backend->backendDeinit(src); + drv =3D src->drv; + + if (drv->backend && + drv->backend->backendDeinit) + drv->backend->backendDeinit(src); =20 VIR_FREE(src->drv); } @@ -4646,26 +4651,28 @@ virStorageFileInitAs(virStorageSourcePtr src, uid_t uid, gid_t gid) { int actualType =3D virStorageSourceGetActualType(src); - src->drv =3D g_new0(virStorageDriverData, 1); + virStorageDriverDataPtr drv =3D g_new0(virStorageDriverData, 1); + + src->drv =3D drv; =20 if (uid =3D=3D (uid_t) -1) - src->drv->uid =3D geteuid(); + drv->uid =3D geteuid(); else - src->drv->uid =3D uid; + drv->uid =3D uid; =20 if (gid =3D=3D (gid_t) -1) - src->drv->gid =3D getegid(); + drv->gid =3D getegid(); else - src->drv->gid =3D gid; + drv->gid =3D gid; =20 if (virStorageFileBackendForType(actualType, src->protocol, true, - &src->drv->backend) < 0) + &drv->backend) < 0) goto error; =20 - if (src->drv->backend->backendInit && - src->drv->backend->backendInit(src) < 0) + if (drv->backend->backendInit && + drv->backend->backendInit(src) < 0) goto error; =20 return 0; @@ -4700,15 +4707,22 @@ virStorageFileInit(virStorageSourcePtr src) int virStorageFileCreate(virStorageSourcePtr src) { + virStorageDriverDataPtr drv =3D NULL; int ret; =20 - if (!virStorageFileIsInitialized(src) || - !src->drv->backend->storageFileCreate) { + if (!virStorageFileIsInitialized(src)) { errno =3D ENOSYS; return -2; } =20 - ret =3D src->drv->backend->storageFileCreate(src); + drv =3D src->drv; + + if (!drv->backend->storageFileCreate) { + errno =3D ENOSYS; + return -2; + } + + ret =3D drv->backend->storageFileCreate(src); =20 VIR_DEBUG("created storage file %p: ret=3D%d, errno=3D%d", src, ret, errno); @@ -4730,15 +4744,22 @@ virStorageFileCreate(virStorageSourcePtr src) int virStorageFileUnlink(virStorageSourcePtr src) { + virStorageDriverDataPtr drv =3D NULL; int ret; =20 - if (!virStorageFileIsInitialized(src) || - !src->drv->backend->storageFileUnlink) { + if (!virStorageFileIsInitialized(src)) { errno =3D ENOSYS; return -2; } =20 - ret =3D src->drv->backend->storageFileUnlink(src); + drv =3D src->drv; + + if (!drv->backend->storageFileUnlink) { + errno =3D ENOSYS; + return -2; + } + + ret =3D drv->backend->storageFileUnlink(src); =20 VIR_DEBUG("unlinked storage file %p: ret=3D%d, errno=3D%d", src, ret, errno); @@ -4760,15 +4781,22 @@ int virStorageFileStat(virStorageSourcePtr src, struct stat *st) { + virStorageDriverDataPtr drv =3D NULL; int ret; =20 - if (!virStorageFileIsInitialized(src) || - !src->drv->backend->storageFileStat) { + if (!virStorageFileIsInitialized(src)) { errno =3D ENOSYS; return -2; } =20 - ret =3D src->drv->backend->storageFileStat(src, st); + drv =3D src->drv; + + if (!drv->backend->storageFileStat) { + errno =3D ENOSYS; + return -2; + } + + ret =3D drv->backend->storageFileStat(src, st); =20 VIR_DEBUG("stat of storage file %p: ret=3D%d, errno=3D%d", src, ret, errno); @@ -4795,6 +4823,7 @@ virStorageFileRead(virStorageSourcePtr src, size_t len, char **buf) { + virStorageDriverDataPtr drv =3D NULL; ssize_t ret; =20 if (!virStorageFileIsInitialized(src)) { @@ -4803,10 +4832,12 @@ virStorageFileRead(virStorageSourcePtr src, return -1; } =20 - if (!src->drv->backend->storageFileRead) + drv =3D src->drv; + + if (!drv->backend->storageFileRead) return -2; =20 - ret =3D src->drv->backend->storageFileRead(src, offset, len, buf); + ret =3D drv->backend->storageFileRead(src, offset, len, buf); =20 VIR_DEBUG("read '%zd' bytes from storage '%p' starting at offset '%zu'= ", ret, src, offset); @@ -4826,13 +4857,17 @@ virStorageFileRead(virStorageSourcePtr src, const char * virStorageFileGetUniqueIdentifier(virStorageSourcePtr src) { + virStorageDriverDataPtr drv =3D NULL; + if (!virStorageFileIsInitialized(src)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("storage file backend not initialized")); return NULL; } =20 - if (!src->drv->backend->storageFileGetUniqueIdentifier) { + drv =3D src->drv; + + if (!drv->backend->storageFileGetUniqueIdentifier) { virReportError(VIR_ERR_INTERNAL_ERROR, _("unique storage file identifier not implemented f= or " "storage type %s (protocol: %s)'"), @@ -4841,7 +4876,7 @@ virStorageFileGetUniqueIdentifier(virStorageSourcePtr= src) return NULL; } =20 - return src->drv->backend->storageFileGetUniqueIdentifier(src); + return drv->backend->storageFileGetUniqueIdentifier(src); } =20 =20 @@ -4859,13 +4894,21 @@ int virStorageFileAccess(virStorageSourcePtr src, int mode) { - if (!virStorageFileIsInitialized(src) || - !src->drv->backend->storageFileAccess) { + virStorageDriverDataPtr drv =3D NULL; + + if (!virStorageFileIsInitialized(src)) { + errno =3D ENOSYS; + return -2; + } + + drv =3D src->drv; + + if (!drv->backend->storageFileAccess) { errno =3D ENOSYS; return -2; } =20 - return src->drv->backend->storageFileAccess(src, mode); + return drv->backend->storageFileAccess(src, mode); } =20 =20 @@ -4885,8 +4928,16 @@ virStorageFileChown(const virStorageSource *src, uid_t uid, gid_t gid) { - if (!virStorageFileIsInitialized(src) || - !src->drv->backend->storageFileChown) { + virStorageDriverDataPtr drv =3D NULL; + + if (!virStorageFileIsInitialized(src)) { + errno =3D ENOSYS; + return -2; + } + + drv =3D src->drv; + + if (!drv->backend->storageFileChown) { errno =3D ENOSYS; return -2; } @@ -4894,7 +4945,7 @@ virStorageFileChown(const virStorageSource *src, VIR_DEBUG("chown of storage file %p to %u:%u", src, (unsigned int)uid, (unsigned int)gid); =20 - return src->drv->backend->storageFileChown(src, uid, gid); + return drv->backend->storageFileChown(src, uid, gid); } =20 =20 @@ -4914,8 +4965,9 @@ virStorageFileReportBrokenChain(int errcode, virStorageSourcePtr parent) { if (src->drv) { - unsigned int access_user =3D src->drv->uid; - unsigned int access_group =3D src->drv->gid; + virStorageDriverDataPtr drv =3D src->drv; + unsigned int access_user =3D drv->uid; + unsigned int access_group =3D drv->gid; =20 if (src =3D=3D parent) { virReportSystemError(errcode, diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index d39486ad59..a1e0afb28f 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -262,9 +262,6 @@ struct _virStorageSourceSlice { }; =20 =20 -typedef struct _virStorageDriverData virStorageDriverData; -typedef virStorageDriverData *virStorageDriverDataPtr; - typedef struct _virStorageSource virStorageSource; typedef virStorageSource *virStorageSourcePtr; =20 @@ -334,7 +331,7 @@ struct _virStorageSource { virStorageSourcePtr backingStore; =20 /* metadata for storage driver access to remote and local volumes */ - virStorageDriverDataPtr drv; + void *drv; =20 /* metadata about storage image which need separate fields */ /* Relative name by which this image was opened from its parent, or NU= LL diff --git a/src/util/virstoragefilebackend.h b/src/util/virstoragefileback= end.h index c7af77bf8f..43b36e95bc 100644 --- a/src/util/virstoragefilebackend.h +++ b/src/util/virstoragefilebackend.h @@ -28,6 +28,8 @@ typedef struct _virStorageFileBackend virStorageFileBackend; typedef virStorageFileBackend *virStorageFileBackendPtr; =20 +typedef struct _virStorageDriverData virStorageDriverData; +typedef virStorageDriverData *virStorageDriverDataPtr; struct _virStorageDriverData { virStorageFileBackendPtr backend; void *priv; --=20 2.28.0