Re: [PATCH v2 13/21] libmultipath: provide defaults for {get, put}_multipath_config

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

 



On Thu, 2020-09-24 at 23:34 -0500, Benjamin Marzinski wrote:
> 
> This causes problems with the libmpathvalid library code I
> wrote.  The
> issue is that right now, when you run _init_config() if
> get_multipath_config() returns NULL, you will use the default
> loglevel.
> I would like the library user to have control of the log level, even
> during the calls to _init_config().

I see. So using init_config() actually had a benefit for you already
over load_config() :-) Such control over the verbosity would actually
be good for multipath-tools, too.

> One possiblity would be to make init_config() take verbosity as an
> argument.  There would also need to be some other config variable
> that
> gets set at the start of init_config(), which is used by
> libmp_get_multipath_config() to check if it is initialized.

I suggest to track the verbosity independently in a different variable,
and just set it from init_config() if it was actually set in the
config file. Most of the time, we set it from the command line.
This would have the additional benefit not to have to call
get_multipath_config() in dlog().

Martin


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




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux