[Samba] libgpfs.so

Michael Tokarev mjt at tls.msk.ru
Thu Apr 13 18:00:55 UTC 2023


13.04.2023 19:08, Christof Schmitt wrote:
..

>> Curious why samba is constantly trying to load this lib,
>> unconditionally.. is it really needed? What does GPFS do
>> for debugging?
> 
> If GPFS is running on the Samba system, there is also the option to have
> Samba issue log and trace message to GPFS. This can help troubleshooting
> issues that are caused by the interaction of Samba and GPFS by having
> traces from both components in one place.
> 
> With the current way the GPFS API is implemented, Samba tries to load
> the corresponding library at run-time. Looking at the code, we could
> limit this to instances where the gpfs logging backend is enabled:
> 
> diff --git a/lib/util/debug.c b/lib/util/debug.c
> index 95de5ce3595..b83075cb239 100644
> --- a/lib/util/debug.c
> +++ b/lib/util/debug.c
> @@ -406,7 +406,9 @@ static void debug_lttng_log(int msg_level, const char *msg, size_t msg_len)
>   static void debug_gpfs_reload(bool enabled, bool previously_enabled,
>                                const char *prog_name, char *option)
>   {
> -       gpfswrap_init();
> +       if (enabled) {
> +               gpfswrap_init();
> +       }
>   
>          if (enabled && !previously_enabled) {
>                  gpfswrap_init_trace();


This makes sense.  I think it's a good fix.  Wanted to do a similar
change myself but thought I'd ask what it is anyway, to begin with :)

Note this `load-at-run-time' is not a single operation, it is repeated
again and again every minute, - this is how I noticed it while watching
for other events.

Reviewed-by: Michael Tokarev <mjt at tls.msk.ru>

Should it be submitted to the samba git?

Thanks!

/mjt



More information about the samba mailing list