Linux Device Mapper development
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>,
	Hannes Reinecke <hare@suse.de>
Cc: dm-devel@redhat.com, Xose Vazquez Perez <xose.vazquez@gmail.com>
Subject: [PATCH v2 8/8] libmultipath: add deprecated warning for some features settings
Date: Tue, 20 Jun 2017 13:46:14 +0200	[thread overview]
Message-ID: <20170620114614.26261-9-mwilck@suse.com> (raw)
In-Reply-To: <20170620114614.26261-1-mwilck@suse.com>

The device-mapper features "queue_if_no_path" and
"retain_attached_hw_handler" should be set via the configuration
keywords "no_path_retry" and "retain_attached_hw_handler",
respectively, not via "features".
Print a warning if these "features" settings are encountered.

So far these "features" settings will only be ignored if the
respective other keyword is set, so in particular
'features "1 queue_if_no_path"' will still work as expected, but
cause the warning to be printed.

We should consider ignoring these completely in a future version.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/propsel.c     | 6 ++++++
 multipath/multipath.conf.5 | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
index ccd067f5..f11052f2 100644
--- a/libmultipath/propsel.c
+++ b/libmultipath/propsel.c
@@ -290,6 +290,9 @@ void reconcile_features_with_options(const char *id, char **features, int* no_pa
 	 * it's translated into "no_path_retry queue" here.
 	 */
 	if (strstr(*features, q_i_n_p)) {
+		condlog(0, "%s: option 'features \"1 %s\"' is deprecated, "
+			"please use 'no_path_retry queue' instead",
+			id, q_i_n_p);
 		if (*no_path_retry == NO_PATH_RETRY_UNDEF) {
 			*no_path_retry = NO_PATH_RETRY_QUEUE;
 			print_no_path_retry(buff, sizeof(buff),
@@ -307,6 +310,9 @@ void reconcile_features_with_options(const char *id, char **features, int* no_pa
 		remove_feature(features, q_i_n_p);
 	}
 	if (strstr(*features, r_a_h_h)) {
+		condlog(0, "%s: option 'features \"1 %s\"' is deprecated, "
+			"please use '%s yes' instead",
+			id, r_a_h_h, r_a_h_h);
 		if (*retain_hwhandler == RETAIN_HWHANDLER_UNDEF) {
 			condlog(3, "%s: %s = on (inherited setting from feature '%s')",
 				id, r_a_h_h, r_a_h_h);
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index d8856577..bacd5e30 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -369,7 +369,7 @@ Possible values for the feature list are:
 .TP 12
 .\" XXX
 .I queue_if_no_path
-(Superseded by \fIno_path_retry\fR) Queue I/O if no path is active.
+(Deprecated, superseded by \fIno_path_retry\fR) Queue I/O if no path is active.
 Identical to the \fIno_path_retry\fR with \fIqueue\fR value. If both this
 feature and \fIno_path_retry\fR are set, the latter value takes
 precedence. See KNOWN ISSUES.
-- 
2.13.1

  parent reply	other threads:[~2017-06-20 11:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 11:46 [PATCH v2 0/8] multipath-tools: no_path_retry/queue_if_no_path logic Martin Wilck
2017-06-20 11:46 ` [PATCH v2 1/8] libmultipath: load_config: skip setting unnecessary defaults Martin Wilck
2017-06-20 14:36   ` Hannes Reinecke
2017-06-20 16:25     ` Benjamin Marzinski
2017-06-20 18:28     ` [PATCH] Clarify commit message in select_max_sectors_kb() Martin Wilck
2017-06-20 11:46 ` [PATCH v2 2/8] libmultipath: add/remove_feature: use const char* for feature Martin Wilck
2017-06-20 15:01   ` Hannes Reinecke
2017-06-20 11:46 ` [PATCH v2 3/8] libmultipath: clarify option conflicts for "features" Martin Wilck
2017-06-20 11:46 ` [PATCH v2 4/8] libmultipath: merge_hwe: fix queue_if_no_path logic Martin Wilck
2017-06-20 11:46 ` [PATCH v2 5/8] libmultipath: assemble_map: " Martin Wilck
2017-06-20 11:46 ` [PATCH v2 6/8] multipath.conf.5: document no_path_retry vs. queue_if_no_path Martin Wilck
2017-06-20 11:46 ` [PATCH v2 7/8] multipath.conf.5: Remove ??? and other minor fixes Martin Wilck
2017-06-20 11:46 ` Martin Wilck [this message]
2017-06-20 18:44 ` [PATCH v2 0/8] multipath-tools: no_path_retry/queue_if_no_path logic Benjamin Marzinski
2017-06-20 19:04   ` Martin Wilck
2017-06-20 21: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=20170620114614.26261-9-mwilck@suse.com \
    --to=mwilck@suse.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    --cc=xose.vazquez@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox