Re: [PATCH 7/7] remote: use a separate connection for storage APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 03/28/2018 11:18 AM, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/remote/remote_daemon.h          |  1 +
>  src/remote/remote_daemon_dispatch.c | 17 ++++++++++-------
>  src/rpc/gendispatch.pl              |  6 ++++++
>  3 files changed, 17 insertions(+), 7 deletions(-)
> 

FWIW: Once this was applied, I looked through the
remote_daemon_dispatch_stubs.h and remote_daemon_dispatch.c for
priv->conn and various priv->*Conn and with my suggested adjustments
they seem to all be correct. It got monotonous after a bit though :-).

> diff --git a/src/remote/remote_daemon.h b/src/remote/remote_daemon.h
> index 2b757d9cd6..2834da04a9 100644
> --- a/src/remote/remote_daemon.h
> +++ b/src/remote/remote_daemon.h
> @@ -79,6 +79,7 @@ struct daemonClientPrivate {
>      virConnectPtr nodedevConn;
>      virConnectPtr nwfilterConn;
>      virConnectPtr secretConn;
> +    virConnectPtr storageConn;
>  
>      daemonClientStreamPtr streams;
>  };
> diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
> index 1a30d73049..10d9d73ff0 100644
> --- a/src/remote/remote_daemon_dispatch.c
> +++ b/src/remote/remote_daemon_dispatch.c

Forgot remoteClientFreePrivateCallbacks here...

> @@ -1750,6 +1750,8 @@ void remoteClientFree(void *data)
>          virConnectClose(priv->nwfilterConn);
>      if (priv->secretConn)
>          virConnectClose(priv->secretConn);
> +    if (priv->storageConn)
> +        virConnectClose(priv->storageConn);
>  
>      VIR_FREE(priv);
>  }

[...]

> diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
> index 58de379c8a..656f66f1b5 100755
> --- a/src/rpc/gendispatch.pl
> +++ b/src/rpc/gendispatch.pl
> @@ -140,6 +140,9 @@ sub get_conn_arg {
>          if ($type =~ /remote_nonnull_secret/) {
>              return "priv->secretConn";
>          }
> +        if ($type =~ /remote_nonnull_storage/) {
> +            return "priv->storageConn";
> +        }
>      }
>  
>      # This is for the few virConnect APIs that
> @@ -159,6 +162,9 @@ sub get_conn_arg {
>      }
>      if ($proc =~ /Connect.*Secret/) {
>          return "priv->secretConn";
> +    } 

git am and syntax-check told me:

s/} /}/

(there's a trailing space).

w/ adjustments,

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

> +    if ($proc =~ /Connect.*Storage/) {
> +        return "priv->storageConn";
>      }
>  
>      return "priv->conn";
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux