From nobody Sun Feb 8 18:14:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1611257689; cv=none; d=zohomail.com; s=zohoarc; b=WNTVrnDXSl+iz89gM3CfIiQltT/nzsRH4jcXaRVvnndmaOVGi0yhwRs5OesjYD3kACnfh7dD7PH8yTRRTE+hJzhu/jmM4SSf1DhQMy682rDNIvfgmiOYX4dtuLrUu53KrvAQwgY8Bqz2/Ou1FgR4/4ZigKYSfBwrMPGdT9BHpZ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611257689; 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=4T9bl01pcRo/xWsMyNbdhnkq4oK0HG/fDRpVj+ED6Z0=; b=cLgALXlM24Wvn+X2TF25LUV37xAaUqjWlQ+DEbnrvHF7rNkNO0N4juSo3ZLHGqWrqFh8uRN8j+uMP7iAdARuyaR5YAyguSidv8Kx6C9BrxxAfXJwf8MEByWbDVbLjMOxR7RyUodpjhoqqW6e7+x5LbaUF9K90mXx9CQ0ksNHG98= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1611257689278730.7117589568321; Thu, 21 Jan 2021 11:34:49 -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-143-QVgkeSciN2-vws4SYO0HVw-1; Thu, 21 Jan 2021 14:34:45 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 848A5B8103; Thu, 21 Jan 2021 19:34: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 1FD226E51B; Thu, 21 Jan 2021 19:34:38 +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 578A24E58F; Thu, 21 Jan 2021 19:34:38 +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 10LJYaMv023162 for ; Thu, 21 Jan 2021 14:34:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1A82410021AA; Thu, 21 Jan 2021 19:34:36 +0000 (UTC) Received: from antique-laptop.redhat.com (unknown [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDC4B1002382 for ; Thu, 21 Jan 2021 19:34:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611257688; 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=4T9bl01pcRo/xWsMyNbdhnkq4oK0HG/fDRpVj+ED6Z0=; b=AQ9rFqesYr+vgvX2K+RZ13+4ggegJXyxK1UhW5XGsEnH2zKqP+AmQo0qafBx8Md/PYd56L GSQYUeCobKCa9lQV80xWHPytxx5yUTSmj127i1vTdB3tN+lGQqPH3i83Z2mxP6+ICpg86K Voeu77E3e4zpChLfU9DHfy+I7bA2J0M= X-MC-Unique: QVgkeSciN2-vws4SYO0HVw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2 03/13] virstoragefile: change virStorageSource->drv to void pointer Date: Thu, 21 Jan 2021 20:34:17 +0100 Message-Id: <09d25fea078b7aa5ba56874cbe25c4ec7f4c1e17.1611257578.git.phrdina@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 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.79 on 10.5.11.13 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 0fc6835f11..2560e10d37 100644 --- a/src/storage/storage_file_gluster.c +++ b/src/storage/storage_file_gluster.c @@ -47,7 +47,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); @@ -57,7 +58,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 @@ -100,6 +101,7 @@ virStorageFileBackendGlusterInitServer(virStorageFileBa= ckendGlusterPrivPtr priv, static int virStorageFileBackendGlusterInit(virStorageSourcePtr src) { + virStorageDriverDataPtr drv =3D src->drv; virStorageFileBackendGlusterPrivPtr priv =3D NULL; size_t i; =20 @@ -115,7 +117,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(); @@ -134,7 +136,7 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr sr= c) goto error; } =20 - src->drv->priv =3D priv; + drv->priv =3D priv; =20 return 0; =20 @@ -150,7 +152,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, @@ -165,7 +168,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); } @@ -175,7 +179,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); } @@ -187,7 +192,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; @@ -242,7 +248,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); } @@ -295,7 +302,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) @@ -321,7 +329,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 17579126b0..24b47fc788 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4619,7 +4619,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 @@ -4715,12 +4716,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); } @@ -4744,26 +4749,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; @@ -4798,15 +4805,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); @@ -4828,15 +4842,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); @@ -4858,15 +4879,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); @@ -4893,6 +4921,7 @@ virStorageFileRead(virStorageSourcePtr src, size_t len, char **buf) { + virStorageDriverDataPtr drv =3D NULL; ssize_t ret; =20 if (!virStorageFileIsInitialized(src)) { @@ -4901,10 +4930,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); @@ -4924,13 +4955,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)'"), @@ -4939,7 +4974,7 @@ virStorageFileGetUniqueIdentifier(virStorageSourcePtr= src) return NULL; } =20 - return src->drv->backend->storageFileGetUniqueIdentifier(src); + return drv->backend->storageFileGetUniqueIdentifier(src); } =20 =20 @@ -4957,13 +4992,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 @@ -4983,8 +5026,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; } @@ -4992,7 +5043,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 @@ -5012,8 +5063,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 5689c39092..1a722e1fa4 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -263,9 +263,6 @@ struct _virStorageSourceSlice { }; =20 =20 -typedef struct _virStorageDriverData virStorageDriverData; -typedef virStorageDriverData *virStorageDriverDataPtr; - typedef struct _virStorageSource virStorageSource; typedef virStorageSource *virStorageSourcePtr; =20 @@ -337,7 +334,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.29.2