All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <martin.wilck@suse.com>
To: "bmarzins@redhat.com" <bmarzins@redhat.com>,
	"christophe.varoqui@opensvc.com" <christophe.varoqui@opensvc.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [dm-devel] [PATCH v2 7/9] libmultipath: deprecate file and directory config options
Date: Thu, 11 Nov 2021 11:44:44 +0000	[thread overview]
Message-ID: <71d89b6eb201dd69cf8a6a209fa0fc12b8ebe918.camel@suse.com> (raw)
In-Reply-To: <1636592780-20391-8-git-send-email-bmarzins@redhat.com>

On Wed, 2021-11-10 at 19:06 -0600, Benjamin Marzinski wrote:
> Having multipath able to select pathnames for the files and
> directories
> it needs causes unnecessary maintainer headaches. Mark these as
> deprecated, but still support them for now.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>

I would have preferred to start ignoring these options right away
(spitting out warnings). After all, this is upstream, we don't have to 
take care of long-term-support users (distros can keep the old behavior
if they want), and experience shows that depreciation warnings are
ignored until the deprecated feature is actually removed. But if you
prefer doing it this way, fine.

Let's agree to remove these options soon, i.e. with the official
release after the next one (0.8.9, presumably).

> ---
>  libmultipath/dict.c        | 40 +++++++++++++++++++++++++++++-------
> --
>  multipath/multipath.conf.5 |  5 +++++
>  2 files changed, 36 insertions(+), 9 deletions(-)
> 
> diff --git a/libmultipath/dict.c b/libmultipath/dict.c
> index 149d3348..1b4e1106 100644
> --- a/libmultipath/dict.c
> +++ b/libmultipath/dict.c
> @@ -268,6 +268,15 @@ def_ ## option ## _handler (struct config *conf,
> vector strvec,            \
>         return function (strvec, &conf->option, file,
> line_nr);         \
>  }
>  
> +#define declare_def_warn_handler(option,
> function)                     \
> +static
> int                                                             \
> +def_ ## option ## _handler (struct config *conf, vector
> strvec,                \
> +                           const char *file, int
> line_nr)              \
> +{                                                                   
>    \
> +       condlog(2, "%s line %d, \"" #option "\" is deprecated and
> will be disabled in a future release", file,
> line_nr);                                \
> +       return function (strvec, &conf->option, file,
> line_nr);         \
> +}
> +
>  #define declare_def_range_handler(option, minval,
> maxval)                      \
>  static
> int                                                             \
>  def_ ## option ## _handler (struct config *conf, vector
> strvec,         \
> @@ -284,6 +293,17 @@ snprint_def_ ## option (struct config *conf,
> struct strbuf *buff,  \
>         return function(buff, conf-
> >option);                            \
>  }
>  
> +#define declare_def_snprint_non_defstr(option, function,
> value)                \
> +static
> int                                                             \
> +snprint_def_ ## option (struct config *conf, struct strbuf
> *buff,      \
> +                       const void
> *data)                               \
> +{                                                                   
>    \
> +       static const char *s =
> value;                                   \
> +       if (!conf->option || strcmp(conf->option, s) ==
> 0)              \
> +               return
> 0;                                               \
> +       return function(buff, conf-
> >option);                            \
> +}

I'd actually print the value here, even if it's empty or equal to the
default. That would be helpful in the future too, when these options
are removed. This way customers can verify the settings multipathd is
using by default.

Regards,
Martin




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


  reply	other threads:[~2021-11-11 11:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  1:06 [dm-devel] [PATCH v2 0/9] improving config parsing warnings Benjamin Marzinski
2021-11-11  1:06 ` [dm-devel] [PATCH v2 1/9] libmultipath: add section name to invalid keyword output Benjamin Marzinski
2021-11-11  1:06 ` [dm-devel] [PATCH v2 2/9] libmultipath: use typedef for keyword handler function Benjamin Marzinski
2021-11-11  1:06 ` [dm-devel] [PATCH v2 3/9] libmultipath: print the correct file when parsing fails Benjamin Marzinski
2021-11-11  1:06 ` [dm-devel] [PATCH v2 4/9] libmultipath: pass file and line number to keyword handlers Benjamin Marzinski
2021-11-11 11:31   ` Martin Wilck
2021-11-11  1:06 ` [dm-devel] [PATCH v2 5/9] libmultipath: make set_int take a range for valid values Benjamin Marzinski
2021-11-11 11:33   ` Martin Wilck
2021-11-11  1:06 ` [dm-devel] [PATCH v2 6/9] libmultipath: improve checks for set_str Benjamin Marzinski
2021-11-11 11:34   ` Martin Wilck
2021-11-11  1:06 ` [dm-devel] [PATCH v2 7/9] libmultipath: deprecate file and directory config options Benjamin Marzinski
2021-11-11 11:44   ` Martin Wilck [this message]
2021-11-11 15:36     ` Benjamin Marzinski
2021-11-11  1:06 ` [dm-devel] [PATCH v2 8/9] libmultipath: split set_int to enable reuse Benjamin Marzinski
2021-11-11 11:52   ` Martin Wilck
2021-11-11  1:06 ` [dm-devel] [PATCH v2 9/9] libmultipath: cleanup invalid config handling Benjamin Marzinski
2021-11-11 11:54   ` Martin Wilck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71d89b6eb201dd69cf8a6a209fa0fc12b8ebe918.camel@suse.com \
    --to=martin.wilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.