All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options
@ 2022-04-14 13:18 mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 1/7] libmultipath: add declare_deprecated_handler() helper mwilck
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mwilck @ 2022-04-14 13:18 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

[-- Attachment #1: Type: application/octet-stream, Size: 2184 bytes --]

From: Martin Wilck <mwilck@suse.com>

As discussed earlier [1], multipath_dir and config_dir are deprecated
and are now removed. They are replaced by compile-time options.
This patch set also removes the long-deprecated getuid_callout option.

Regards
Martin

[1] https://listman.redhat.com/archives/dm-devel/2021-November/048346.html

PS: I haven't yet figured out the reason for the late problems with
my emails on dm-devel. So far I'm just hoping they'll get through this
time.

Martin Wilck (7):
  libmultipath: add declare_deprecated_handler() helper
  multipath-tools: make multipath_dir a compiled-in option
  multipath-tools: make config_dir a compiled-in option
  libmultipath: print error message for pg_timeout
  libmultipath: remove support for long-deprecated options
  multipath-tools: stop supporting getuid_callout
  libmultipath.version: bump version

 Makefile.inc                      |   6 +-
 README.md                         |   6 +
 libmultipath/Makefile             |   2 +-
 libmultipath/callout.c            | 221 ------------------------------
 libmultipath/callout.h            |   7 -
 libmultipath/checkers.c           |  20 +--
 libmultipath/checkers.h           |   4 +-
 libmultipath/config.c             |  31 +----
 libmultipath/config.h             |   5 -
 libmultipath/defaults.h           |   2 -
 libmultipath/dict.c               | 104 ++++----------
 libmultipath/discovery.c          |  22 +--
 libmultipath/foreign.c            |  11 +-
 libmultipath/foreign.h            |   2 +-
 libmultipath/libmultipath.version |   2 +-
 libmultipath/prio.c               |  19 +--
 libmultipath/prio.h               |   6 +-
 libmultipath/propsel.c            |  39 ++----
 libmultipath/structs.c            |   1 -
 libmultipath/structs.h            |   1 -
 multipath/main.c                  |   6 +-
 multipath/multipath.conf.5        |  40 +-----
 multipathd/main.c                 |   6 +-
 multipathd/uxlsnr.c               |  27 +---
 24 files changed, 106 insertions(+), 484 deletions(-)
 delete mode 100644 libmultipath/callout.c
 delete mode 100644 libmultipath/callout.h

-- 
2.35.1


[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dm-devel] [PATCH 1/7] libmultipath: add declare_deprecated_handler() helper
  2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
@ 2022-04-14 13:18 ` mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 2/7] multipath-tools: make multipath_dir a compiled-in option mwilck
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mwilck @ 2022-04-14 13:18 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

[-- Attachment #1: Type: application/octet-stream, Size: 1317 bytes --]

From: Martin Wilck <mwilck@suse.com>

this is like declare_def_warn_handler(), but for options that we
really don't support any more.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/dict.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index 4f7cdb3..0be4309 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -287,6 +287,22 @@ def_ ## option ## _handler (struct config *conf, vector strvec,		\
 	return function (strvec, &conf->option, file, line_nr);		\
 }
 
+static int deprecated_handler(struct config *conf, vector strvec, const char *file,
+			      int line_nr);
+
+#define declare_deprecated_handler(option)				\
+static int								\
+def_ ## option ## _handler (struct config *conf, vector strvec,		\
+			    const char *file, int line_nr)		\
+{									\
+	static bool warned;						\
+	if (!warned) {							\
+		condlog(1, "%s line %d: ignoring deprecated option \"" #option "\"", file, line_nr); \
+		warned = true;						\
+	}								\
+	return deprecated_handler(conf, strvec, file, line_nr);		\
+}
+
 #define declare_def_range_handler(option, minval, maxval)			\
 static int								\
 def_ ## option ## _handler (struct config *conf, vector strvec,         \
-- 
2.35.1


[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [dm-devel] [PATCH 2/7] multipath-tools: make multipath_dir a compiled-in option
  2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 1/7] libmultipath: add declare_deprecated_handler() helper mwilck
@ 2022-04-14 13:18 ` mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 3/7] multipath-tools: make config_dir " mwilck
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mwilck @ 2022-04-14 13:18 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

[-- Attachment #1: Type: application/octet-stream, Size: 20732 bytes --]

From: Martin Wilck <mwilck@suse.com>

There should be no reason to change this at runtime. Make it
configurable at runtime instead, using the make variable
"plugindir".

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 Makefile.inc               |  3 ++-
 README.md                  |  3 +++
 libmultipath/checkers.c    | 20 ++++++++++----------
 libmultipath/checkers.h    |  4 ++--
 libmultipath/config.c      |  7 +------
 libmultipath/config.h      |  1 -
 libmultipath/defaults.h    |  1 -
 libmultipath/dict.c        | 31 ++-----------------------------
 libmultipath/foreign.c     | 11 ++++++-----
 libmultipath/foreign.h     |  2 +-
 libmultipath/prio.c        | 19 ++++++++++---------
 libmultipath/prio.h        |  6 +++---
 libmultipath/propsel.c     | 31 ++++++++++++++-----------------
 multipath/main.c           |  6 +++---
 multipath/multipath.conf.5 |  8 +-------
 multipathd/main.c          |  6 +++---
 16 files changed, 61 insertions(+), 98 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 03f73e4..05ea737 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -96,6 +96,7 @@ libdmmpdir	= $(TOPDIR)/libdmmp
 nvmedir		= $(TOPDIR)/libmultipath/nvme
 includedir	= $(prefix)/usr/include
 pkgconfdir	= $(usrlibdir)/pkgconfig
+plugindir       := $(prefix)/$(LIB)/multipath
 
 GZIP_PROG	= gzip -9 -c
 RM		= rm -f
@@ -126,7 +127,7 @@ WARNFLAGS	:= -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implici
 		  $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
 CPPFLAGS	:= -D_FORTIFY_SOURCE=2
 CFLAGS		:= --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
-		   -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
+		   -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \
 		   -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP
 BIN_CFLAGS	= -fPIE -DPIE
 LIB_CFLAGS	= -fPIC
diff --git a/README.md b/README.md
index 1547862..e0d5e11 100644
--- a/README.md
+++ b/README.md
@@ -72,6 +72,9 @@ Customizing the build
 
 The following variables can be passed to the `make` command line:
 
+ * `plugindir="/some/path"`: directory where libmultipath plugins (path
+   checkers, prioritizers, and foreign multipath support) will be looked up.
+   This used to be the run-time option `multipath_dir` in earlier versions.
  * `ENABLE_LIBDMMP=0`: disable building libdmmp
  * `ENABLE_DMEVENTS_POLL=0`: disable support for the device-mapper event
    polling API. For use with pre-5.0 kernels that don't supprt dmevent polling
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
index 00554d6..fdb91e1 100644
--- a/libmultipath/checkers.c
+++ b/libmultipath/checkers.c
@@ -12,6 +12,8 @@
 #include "vector.h"
 #include "util.h"
 
+static const char * const checker_dir = MULTIPATH_DIR;
+
 struct checker_class {
 	struct list_head node;
 	void *handle;
@@ -133,8 +135,7 @@ void reset_checker_classes(void)
 	}
 }
 
-static struct checker_class *add_checker_class(const char *multipath_dir,
-					       const char *name)
+static struct checker_class *add_checker_class(const char *name)
 {
 	char libname[LIB_CHECKER_NAMELEN];
 	struct stat stbuf;
@@ -148,10 +149,10 @@ static struct checker_class *add_checker_class(const char *multipath_dir,
 	if (!strncmp(c->name, NONE, 4))
 		goto done;
 	snprintf(libname, LIB_CHECKER_NAMELEN, "%s/libcheck%s.so",
-		 multipath_dir, name);
+		 checker_dir, name);
 	if (stat(libname,&stbuf) < 0) {
 		condlog(0,"Checker '%s' not found in %s",
-			name, multipath_dir);
+			name, checker_dir);
 		goto out;
 	}
 	condlog(3, "loading %s checker", libname);
@@ -409,8 +410,7 @@ void checker_clear_message (struct checker *c)
 	c->msgid = CHECKER_MSGID_NONE;
 }
 
-void checker_get(const char *multipath_dir, struct checker *dst,
-		 const char *name)
+void checker_get(struct checker *dst, const char *name)
 {
 	struct checker_class *src = NULL;
 
@@ -420,7 +420,7 @@ void checker_get(const char *multipath_dir, struct checker *dst,
 	if (name && strlen(name)) {
 		src = checker_class_lookup(name);
 		if (!src)
-			src = add_checker_class(multipath_dir, name);
+			src = add_checker_class(name);
 	}
 	dst->cls = src;
 	if (!src)
@@ -429,7 +429,7 @@ void checker_get(const char *multipath_dir, struct checker *dst,
 	(void)checker_class_ref(dst->cls);
 }
 
-int init_checkers(const char *multipath_dir)
+int init_checkers(void)
 {
 #ifdef LOAD_ALL_SHARED_LIBS
 	static const char *const all_checkers[] = {
@@ -444,9 +444,9 @@ int init_checkers(const char *multipath_dir)
 	unsigned int i;
 
 	for (i = 0; i < ARRAY_SIZE(all_checkers); i++)
-		add_checker_class(multipath_dir, all_checkers[i]);
+		add_checker_class(all_checkers[i]);
 #else
-	if (!add_checker_class(multipath_dir, DEFAULT_CHECKER))
+	if (!add_checker_class(DEFAULT_CHECKER))
 		return 1;
 #endif
 	return 0;
diff --git a/libmultipath/checkers.h b/libmultipath/checkers.h
index 5d25a42..ea1e8af 100644
--- a/libmultipath/checkers.h
+++ b/libmultipath/checkers.h
@@ -135,7 +135,7 @@ static inline int checker_selected(const struct checker *c)
 }
 
 const char *checker_state_name(int);
-int init_checkers(const char *);
+int init_checkers(void);
 void cleanup_checkers (void);
 int checker_init (struct checker *, void **);
 int checker_mp_init(struct checker *, void **);
@@ -179,7 +179,7 @@ void reset_checker_classes(void);
  */
 const char *checker_message(const struct checker *);
 void checker_clear_message (struct checker *c);
-void checker_get(const char *, struct checker *, const char *);
+void checker_get(struct checker *, const char *);
 
 /* Prototypes for symbols exported by path checker dynamic libraries (.so) */
 int libcheck_check(struct checker *);
diff --git a/libmultipath/config.c b/libmultipath/config.c
index c3cfa11..faf4d8a 100644
--- a/libmultipath/config.c
+++ b/libmultipath/config.c
@@ -732,9 +732,6 @@ static void _uninit_config(struct config *conf)
 	if (!conf)
 		conf = &__internal_config;
 
-	if (conf->multipath_dir)
-		free(conf->multipath_dir);
-
 	if (conf->selector)
 		free(conf->selector);
 
@@ -929,7 +926,6 @@ int _init_config (const char *file, struct config *conf)
 	conf->bindings_file = set_default(DEFAULT_BINDINGS_FILE);
 	conf->wwids_file = set_default(DEFAULT_WWIDS_FILE);
 	conf->prkeys_file = set_default(DEFAULT_PRKEYS_FILE);
-	conf->multipath_dir = set_default(DEFAULT_MULTIPATHDIR);
 	conf->attribute_flags = 0;
 	conf->reassign_maps = DEFAULT_REASSIGN_MAPS;
 	conf->checkint = CHECKINT_UNDEF;
@@ -1089,8 +1085,7 @@ int _init_config (const char *file, struct config *conf)
 	if (conf->bindings_file == NULL)
 		conf->bindings_file = set_default(DEFAULT_BINDINGS_FILE);
 
-	if (!conf->multipath_dir || !conf->bindings_file ||
-	    !conf->wwids_file || !conf->prkeys_file)
+	if (!conf->bindings_file || !conf->wwids_file || !conf->prkeys_file)
 		goto out;
 
 	libmp_verbosity = conf->verbosity;
diff --git a/libmultipath/config.h b/libmultipath/config.h
index 4f1a18a..2cb9e97 100644
--- a/libmultipath/config.h
+++ b/libmultipath/config.h
@@ -198,7 +198,6 @@ struct config {
 	unsigned int sequence_nr;
 	int recheck_wwid;
 
-	char * multipath_dir;
 	char * selector;
 	struct _vector uid_attrs;
 	char * uid_attribute;
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
index 7d95413..72dcae2 100644
--- a/libmultipath/defaults.h
+++ b/libmultipath/defaults.h
@@ -11,7 +11,6 @@
 #define DEFAULT_NVME_UID_ATTRIBUTE	"ID_WWN"
 #define DEFAULT_DASD_UID_ATTRIBUTE	"ID_UID"
 #define DEFAULT_UDEVDIR		"/dev"
-#define DEFAULT_MULTIPATHDIR	"/" LIB_STRING "/multipath"
 #define DEFAULT_SELECTOR	"service-time 0"
 #define DEFAULT_ALIAS_PREFIX	"mpath"
 #define DEFAULT_FEATURES	"0"
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index 0be4309..4e58d51 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -115,32 +115,6 @@ set_str(vector strvec, void *ptr, const char *file, int line_nr)
 	return 0;
 }
 
-static int
-set_dir(vector strvec, void *ptr, const char *file, int line_nr)
-{
-	char **str_ptr = (char **)ptr;
-	char *old_str = *str_ptr;
-	struct stat sb;
-
-	*str_ptr = set_value(strvec);
-	if (!*str_ptr) {
-		free(old_str);
-		return 1;
-	}
-	if ((*str_ptr)[0] != '/'){
-		condlog(1, "%s line %d, %s is not an absolute directory path. Ignoring", file, line_nr, *str_ptr);
-		*str_ptr = old_str;
-	} else {
-		if (stat(*str_ptr, &sb) == 0 && S_ISDIR(sb.st_mode))
-			free(old_str);
-		else {
-			condlog(1, "%s line %d, %s is not an existing directory. Ignoring", file, line_nr, *str_ptr);
-			*str_ptr = old_str;
-		}
-	}
-	return 0;
-}
-
 static int
 set_path(vector strvec, void *ptr, const char *file, int line_nr)
 {
@@ -479,8 +453,7 @@ declare_def_snprint(verbosity, print_int)
 declare_def_handler(reassign_maps, set_yes_no)
 declare_def_snprint(reassign_maps, print_yes_no)
 
-declare_def_warn_handler(multipath_dir, set_dir)
-declare_def_snprint(multipath_dir, print_str)
+declare_deprecated_handler(multipath_dir)
 
 static int def_partition_delim_handler(struct config *conf, vector strvec,
 				       const char *file, int line_nr)
@@ -2048,7 +2021,7 @@ init_keywords(vector keywords)
 	install_keyword("polling_interval", &checkint_handler, &snprint_def_checkint);
 	install_keyword("max_polling_interval", &def_max_checkint_handler, &snprint_def_max_checkint);
 	install_keyword("reassign_maps", &def_reassign_maps_handler, &snprint_def_reassign_maps);
-	install_keyword("multipath_dir", &def_multipath_dir_handler, &snprint_def_multipath_dir);
+	install_keyword("multipath_dir", &def_multipath_dir_handler, &snprint_deprecated);
 	install_keyword("path_selector", &def_selector_handler, &snprint_def_selector);
 	install_keyword("path_grouping_policy", &def_pgpolicy_handler, &snprint_def_pgpolicy);
 	install_keyword("uid_attrs", &uid_attrs_handler, &snprint_uid_attrs);
diff --git a/libmultipath/foreign.c b/libmultipath/foreign.c
index e80eb3e..d01a5ef 100644
--- a/libmultipath/foreign.c
+++ b/libmultipath/foreign.c
@@ -37,6 +37,7 @@
 #include "strbuf.h"
 
 static vector foreigns;
+static const char *const foreign_dir = MULTIPATH_DIR;
 
 /* This protects vector foreigns */
 static pthread_rwlock_t foreign_lock = PTHREAD_RWLOCK_INITIALIZER;
@@ -125,7 +126,7 @@ static void free_pre(void *arg)
 	}
 }
 
-static int _init_foreign(const char *multipath_dir, const char *enable)
+static int _init_foreign(const char *enable)
 {
 	char pathbuf[PATH_MAX];
 	struct dirent **di;
@@ -153,7 +154,7 @@ static int _init_foreign(const char *multipath_dir, const char *enable)
 		}
 	}
 
-	r = scandir(multipath_dir, &di, select_foreign_libs, alphasort);
+	r = scandir(foreign_dir, &di, select_foreign_libs, alphasort);
 
 	if (r == 0) {
 		condlog(3, "%s: no foreign multipath libraries found",
@@ -208,7 +209,7 @@ static int _init_foreign(const char *multipath_dir, const char *enable)
 					__func__, ret, fgn->name);
 		}
 
-		snprintf(pathbuf, sizeof(pathbuf), "%s/%s", multipath_dir, fn);
+		snprintf(pathbuf, sizeof(pathbuf), "%s/%s", foreign_dir, fn);
 		fgn->handle = dlopen(pathbuf, RTLD_NOW|RTLD_LOCAL);
 		msg = dlerror();
 		if (fgn->handle == NULL) {
@@ -257,7 +258,7 @@ out_free_pre:
 	return r;
 }
 
-int init_foreign(const char *multipath_dir, const char *enable)
+int init_foreign(const char *enable)
 {
 	int ret;
 
@@ -270,7 +271,7 @@ int init_foreign(const char *multipath_dir, const char *enable)
 	}
 
 	pthread_cleanup_push(unlock_foreigns, NULL);
-	ret = _init_foreign(multipath_dir, enable);
+	ret = _init_foreign(enable);
 	pthread_cleanup_pop(1);
 
 	return ret;
diff --git a/libmultipath/foreign.h b/libmultipath/foreign.h
index f547c14..b9cdb36 100644
--- a/libmultipath/foreign.h
+++ b/libmultipath/foreign.h
@@ -198,7 +198,7 @@ struct foreign {
  * @param enable: regex to match foreign library name ("*" above) against
  * @returns: 0 on success, negative value on failure.
  */
-int init_foreign(const char *multipath_dir, const char *enable);
+int init_foreign(const char *enable);
 
 /**
  * cleanup_foreign(dir)
diff --git a/libmultipath/prio.c b/libmultipath/prio.c
index ef68cd0..cdd3752 100644
--- a/libmultipath/prio.c
+++ b/libmultipath/prio.c
@@ -8,6 +8,7 @@
 #include "util.h"
 #include "prio.h"
 
+static const char * const prio_dir = MULTIPATH_DIR;
 static LIST_HEAD(prioritizers);
 
 unsigned int get_prio_timeout(unsigned int timeout_ms,
@@ -18,7 +19,7 @@ unsigned int get_prio_timeout(unsigned int timeout_ms,
 	return default_timeout;
 }
 
-int init_prio (const char *multipath_dir)
+int init_prio(void)
 {
 #ifdef LOAD_ALL_SHARED_LIBS
 	static const char *const all_prios[] = {
@@ -39,9 +40,9 @@ int init_prio (const char *multipath_dir)
 	unsigned int i;
 
 	for  (i = 0; i < ARRAY_SIZE(all_prios); i++)
-		add_prio(multipath_dir, all_prios[i]);
+		add_prio(all_prios[i]);
 #else
-	if (!add_prio(multipath_dir, DEFAULT_PRIO))
+	if (!add_prio(DEFAULT_PRIO))
 		return 1;
 #endif
 	return 0;
@@ -90,7 +91,7 @@ void cleanup_prio(void)
 	}
 }
 
-static struct prio * prio_lookup (char * name)
+static struct prio *prio_lookup(const char *name)
 {
 	struct prio * p;
 
@@ -109,7 +110,7 @@ int prio_set_args (struct prio * p, const char * args)
 	return snprintf(p->args, PRIO_ARGS_LEN, "%s", args);
 }
 
-struct prio * add_prio (const char *multipath_dir, const char * name)
+struct prio *add_prio (const char *name)
 {
 	char libname[LIB_PRIO_NAMELEN];
 	struct stat stbuf;
@@ -121,10 +122,10 @@ struct prio * add_prio (const char *multipath_dir, const char * name)
 		return NULL;
 	snprintf(p->name, PRIO_NAME_LEN, "%s", name);
 	snprintf(libname, LIB_PRIO_NAMELEN, "%s/libprio%s.so",
-		 multipath_dir, name);
+		 prio_dir, name);
 	if (stat(libname,&stbuf) < 0) {
 		condlog(0,"Prioritizer '%s' not found in %s",
-			name, multipath_dir);
+			name, prio_dir);
 		goto out;
 	}
 	condlog(3, "loading %s prioritizer", libname);
@@ -170,7 +171,7 @@ const char * prio_args (const struct prio * p)
 	return p->args;
 }
 
-void prio_get (char *multipath_dir, struct prio * dst, char * name, char * args)
+void prio_get(struct prio *dst, const char *name, const char *args)
 {
 	struct prio * src = NULL;
 
@@ -180,7 +181,7 @@ void prio_get (char *multipath_dir, struct prio * dst, char * name, char * args)
 	if (name && strlen(name)) {
 		src = prio_lookup(name);
 		if (!src)
-			src = add_prio(multipath_dir, name);
+			src = add_prio(name);
 	}
 	if (!src) {
 		dst->getprio = NULL;
diff --git a/libmultipath/prio.h b/libmultipath/prio.h
index 66c7936..184bf65 100644
--- a/libmultipath/prio.h
+++ b/libmultipath/prio.h
@@ -54,11 +54,11 @@ struct prio {
 
 unsigned int get_prio_timeout(unsigned int checker_timeout,
 			      unsigned int default_timeout);
-int init_prio (const char *);
+int init_prio(void);
 void cleanup_prio (void);
-struct prio * add_prio (const char *, const char *);
+struct prio * add_prio (const char *);
 int prio_getprio (struct prio *, struct path *, unsigned int);
-void prio_get (char *, struct prio *, char *, char *);
+void prio_get (struct prio *, const char *, const char *);
 void prio_put (struct prio *);
 int prio_selected (const struct prio *);
 const char * prio_name (const struct prio *);
diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
index 72b4299..84da96e 100644
--- a/libmultipath/propsel.c
+++ b/libmultipath/propsel.c
@@ -560,7 +560,7 @@ int select_checker(struct config *conf, struct path *pp)
 	do_set(checker_name, conf, ckr_name, conf_origin);
 	do_default(ckr_name, DEFAULT_CHECKER);
 out:
-	checker_get(conf->multipath_dir, c, ckr_name);
+	checker_get(c, ckr_name);
 	condlog(3, "%s: path_checker = %s %s", pp->dev,
 		checker_name(c), origin);
 	if (conf->checker_timeout) {
@@ -627,8 +627,7 @@ out:
 	return 0;
 }
 
-void
-detect_prio(struct config *conf, struct path * pp)
+void detect_prio(struct path *pp)
 {
 	struct prio *p = &pp->prio;
 	char buff[512];
@@ -654,19 +653,19 @@ detect_prio(struct config *conf, struct path * pp)
 	default:
 		return;
 	}
-	prio_get(conf->multipath_dir, p, default_prio, DEFAULT_PRIO_ARGS);
+	prio_get(p, default_prio, DEFAULT_PRIO_ARGS);
 }
 
-#define set_prio(dir, src, msg)					\
+#define set_prio(src, msg)						\
 do {									\
 	if (src && src->prio_name) {					\
-		prio_get(dir, p, src->prio_name, src->prio_args);	\
+		prio_get(p, src->prio_name, src->prio_args);		\
 		origin = msg;						\
 		goto out;						\
 	}								\
 } while(0)
 
-#define set_prio_from_vec(type, dir, src, msg, p)			\
+#define set_prio_from_vec(type, src, msg, p)				\
 do {									\
 	type *_p;							\
 	int i;								\
@@ -679,7 +678,7 @@ do {									\
 			prio_args = _p->prio_args;			\
 	}								\
 	if (prio_name != NULL) {					\
-		prio_get(dir, p, prio_name, prio_args);			\
+		prio_get(p, prio_name, prio_args);			\
 		origin = msg;						\
 		goto out;						\
 	}								\
@@ -693,19 +692,18 @@ int select_prio(struct config *conf, struct path *pp)
 	int log_prio = 3;
 
 	if (pp->detect_prio == DETECT_PRIO_ON) {
-		detect_prio(conf, pp);
+		detect_prio(pp);
 		if (prio_selected(p)) {
 			origin = autodetect_origin;
 			goto out;
 		}
 	}
 	mpe = find_mpe(conf->mptable, pp->wwid);
-	set_prio(conf->multipath_dir, mpe, multipaths_origin);
-	set_prio(conf->multipath_dir, conf->overrides, overrides_origin);
-	set_prio_from_vec(struct hwentry, conf->multipath_dir,
-			  pp->hwe, hwe_origin, p);
-	set_prio(conf->multipath_dir, conf, conf_origin);
-	prio_get(conf->multipath_dir, p, DEFAULT_PRIO, DEFAULT_PRIO_ARGS);
+	set_prio(mpe, multipaths_origin);
+	set_prio(conf->overrides, overrides_origin);
+	set_prio_from_vec(struct hwentry, pp->hwe, hwe_origin, p);
+	set_prio(conf, conf_origin);
+	prio_get(p, DEFAULT_PRIO, DEFAULT_PRIO_ARGS);
 	origin = default_origin;
 out:
 	/*
@@ -715,8 +713,7 @@ out:
 		int tpgs = path_get_tpgs(pp);
 
 		if (tpgs == TPGS_NONE) {
-			prio_get(conf->multipath_dir,
-				 p, DEFAULT_PRIO, DEFAULT_PRIO_ARGS);
+			prio_get(p, DEFAULT_PRIO, DEFAULT_PRIO_ARGS);
 			origin = "(setting: emergency fallback - alua failed)";
 			log_prio = 1;
 		}
diff --git a/multipath/main.c b/multipath/main.c
index 01eba9a..034dd2f 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -988,11 +988,11 @@ main (int argc, char *argv[])
 
 	libmp_udev_set_sync_support(1);
 
-	if (init_checkers(conf->multipath_dir)) {
+	if (init_checkers()) {
 		condlog(0, "failed to initialize checkers");
 		goto out;
 	}
-	if (init_prio(conf->multipath_dir)) {
+	if (init_prio()) {
 		condlog(0, "failed to initialize prioritizers");
 		goto out;
 	}
@@ -1001,7 +1001,7 @@ main (int argc, char *argv[])
 		conf->enable_foreign = strdup("");
 
 	/* Failing here is non-fatal */
-	init_foreign(conf->multipath_dir, conf->enable_foreign);
+	init_foreign(conf->enable_foreign);
 	if (cmd == CMD_USABLE_PATHS) {
 		r = check_usable_paths(conf, dev, dev_type) ?
 			RTVL_FAIL : RTVL_OK;
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index ca25c61..4032641 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -178,13 +178,7 @@ The default is: \fBno\fR
 .
 .TP
 .B multipath_dir
-This option is deprecated, and will be removed in a future release.
-Directory where the dynamic shared objects are stored. Defined at compile time,
-commonly \fI/lib64/multipath/\fR or \fI/lib/multipath/\fR.
-.RS
-.TP
-The default is: \fB<system dependent>\fR
-.RE
+This option is not supported any more. The value is ignored.
 .
 .
 .TP
diff --git a/multipathd/main.c b/multipathd/main.c
index 6808ad1..2f2b9d4 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -3308,17 +3308,17 @@ child (__attribute__((unused)) void *param)
 		conf->bindings_read_only = bindings_read_only;
 	uxsock_timeout = conf->uxsock_timeout;
 	rcu_assign_pointer(multipath_conf, conf);
-	if (init_checkers(conf->multipath_dir)) {
+	if (init_checkers()) {
 		condlog(0, "failed to initialize checkers");
 		goto failed;
 	}
-	if (init_prio(conf->multipath_dir)) {
+	if (init_prio()) {
 		condlog(0, "failed to initialize prioritizers");
 		goto failed;
 	}
 	/* Failing this is non-fatal */
 
-	init_foreign(conf->multipath_dir, conf->enable_foreign);
+	init_foreign(conf->enable_foreign);
 
 	if (poll_dmevents)
 		poll_dmevents = dmevent_poll_supported();
-- 
2.35.1


[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [dm-devel] [PATCH 3/7] multipath-tools: make config_dir a compiled-in option
  2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 1/7] libmultipath: add declare_deprecated_handler() helper mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 2/7] multipath-tools: make multipath_dir a compiled-in option mwilck
@ 2022-04-14 13:18 ` mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 4/7] libmultipath: print error message for pg_timeout mwilck
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mwilck @ 2022-04-14 13:18 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

[-- Attachment #1: Type: application/octet-stream, Size: 9850 bytes --]

From: Martin Wilck <mwilck@suse.com>

Don't allow overriding the configuration directory at runtime.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 Makefile.inc               |  3 ++-
 README.md                  |  3 +++
 libmultipath/config.c      | 10 +---------
 libmultipath/config.h      |  1 -
 libmultipath/defaults.h    |  1 -
 libmultipath/dict.c        | 29 +++++------------------------
 multipath/multipath.conf.5 | 10 +---------
 multipathd/uxlsnr.c        | 27 +++++++--------------------
 8 files changed, 19 insertions(+), 65 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 05ea737..cef7a06 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -97,6 +97,7 @@ nvmedir		= $(TOPDIR)/libmultipath/nvme
 includedir	= $(prefix)/usr/include
 pkgconfdir	= $(usrlibdir)/pkgconfig
 plugindir       := $(prefix)/$(LIB)/multipath
+configdir       := $(prefix)/etc/multipath/conf.d
 
 GZIP_PROG	= gzip -9 -c
 RM		= rm -f
@@ -128,7 +129,7 @@ WARNFLAGS	:= -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implici
 CPPFLAGS	:= -D_FORTIFY_SOURCE=2
 CFLAGS		:= --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
 		   -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \
-		   -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP
+		   -DCONFIG_DIR=\"$(configdir)\" -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP
 BIN_CFLAGS	= -fPIE -DPIE
 LIB_CFLAGS	= -fPIC
 SHARED_FLAGS	= -shared
diff --git a/README.md b/README.md
index e0d5e11..d67888d 100644
--- a/README.md
+++ b/README.md
@@ -75,6 +75,9 @@ The following variables can be passed to the `make` command line:
  * `plugindir="/some/path"`: directory where libmultipath plugins (path
    checkers, prioritizers, and foreign multipath support) will be looked up.
    This used to be the run-time option `multipath_dir` in earlier versions.
+ * `configdir="/some/path"` : directory to search for configuration files.
+    This used to be the run-time option `config_dir` in earlier versions.
+	The default is `/etc/multipath/conf.d`.
  * `ENABLE_LIBDMMP=0`: disable building libdmmp
  * `ENABLE_DMEVENTS_POLL=0`: disable support for the device-mapper event
    polling API. For use with pre-5.0 kernels that don't supprt dmevent polling
diff --git a/libmultipath/config.c b/libmultipath/config.c
index faf4d8a..5478c1d 100644
--- a/libmultipath/config.c
+++ b/libmultipath/config.c
@@ -774,11 +774,6 @@ static void _uninit_config(struct config *conf)
 	if (conf->checker_name)
 		free(conf->checker_name);
 
-	if (conf->config_dir)
-		free(conf->config_dir);
-	if (conf->enable_foreign)
-		free(conf->enable_foreign);
-
 	free_blacklist(conf->blist_devnode);
 	free_blacklist(conf->blist_wwid);
 	free_blacklist(conf->blist_property);
@@ -974,10 +969,7 @@ int _init_config (const char *file, struct config *conf)
 	}
 
 	conf->processed_main_config = 1;
-	if (conf->config_dir == NULL)
-		conf->config_dir = set_default(DEFAULT_CONFIG_DIR);
-	if (conf->config_dir && conf->config_dir[0] != '\0')
-		process_config_dir(conf, conf->config_dir);
+	process_config_dir(conf, CONFIG_DIR);
 
 	/*
 	 * fill the voids left in the config file
diff --git a/libmultipath/config.h b/libmultipath/config.h
index 2cb9e97..4d001e4 100644
--- a/libmultipath/config.h
+++ b/libmultipath/config.h
@@ -212,7 +212,6 @@ struct config {
 	char * checker_name;
 	char * alias_prefix;
 	char * partition_delim;
-	char * config_dir;
 	int prkey_source;
 	int all_tg_pt;
 	struct be64 reservation_key;
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
index 72dcae2..7979f20 100644
--- a/libmultipath/defaults.h
+++ b/libmultipath/defaults.h
@@ -68,7 +68,6 @@
 #define DEFAULT_BINDINGS_FILE	"/etc/multipath/bindings"
 #define DEFAULT_WWIDS_FILE	"/etc/multipath/wwids"
 #define DEFAULT_PRKEYS_FILE    "/etc/multipath/prkeys"
-#define DEFAULT_CONFIG_DIR	"/etc/multipath/conf.d"
 #define MULTIPATH_SHM_BASE	"/dev/shm/multipath/"
 
 
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index 4e58d51..91a0580 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -266,8 +266,8 @@ static int deprecated_handler(struct config *conf, vector strvec, const char *fi
 
 #define declare_deprecated_handler(option)				\
 static int								\
-def_ ## option ## _handler (struct config *conf, vector strvec,		\
-			    const char *file, int line_nr)		\
+deprecated_ ## option ## _handler (struct config *conf, vector strvec,	\
+				   const char *file, int line_nr)	\
 {									\
 	static bool warned;						\
 	if (!warned) {							\
@@ -846,26 +846,7 @@ declare_def_handler(enable_foreign, set_str)
 declare_def_snprint_defstr(enable_foreign, print_str,
 			   DEFAULT_ENABLE_FOREIGN)
 
-static int
-def_config_dir_handler(struct config *conf, vector strvec, const char *file,
-		       int line_nr)
-{
-	static bool warned;
-
-	/* this is only valid in the main config file */
-	if (conf->processed_main_config) {
-		condlog(1, "%s line %d, config_dir option only valid in /etc/multipath.conf",
-			file, line_nr);
-		return 0;
-	}
-	if (!warned) {
-		condlog(2, "%s line %d, \"config_dir\" is deprecated and will be disabled in a future release",
-			file, line_nr);
-		warned = true;
-	}
-	return set_path(strvec, &conf->config_dir, file, line_nr);
-}
-declare_def_snprint(config_dir, print_str)
+declare_deprecated_handler(config_dir)
 
 #define declare_def_attr_handler(option, function)			\
 static int								\
@@ -2021,7 +2002,7 @@ init_keywords(vector keywords)
 	install_keyword("polling_interval", &checkint_handler, &snprint_def_checkint);
 	install_keyword("max_polling_interval", &def_max_checkint_handler, &snprint_def_max_checkint);
 	install_keyword("reassign_maps", &def_reassign_maps_handler, &snprint_def_reassign_maps);
-	install_keyword("multipath_dir", &def_multipath_dir_handler, &snprint_deprecated);
+	install_keyword("multipath_dir", &deprecated_multipath_dir_handler, &snprint_deprecated);
 	install_keyword("path_selector", &def_selector_handler, &snprint_def_selector);
 	install_keyword("path_grouping_policy", &def_pgpolicy_handler, &snprint_def_pgpolicy);
 	install_keyword("uid_attrs", &uid_attrs_handler, &snprint_uid_attrs);
@@ -2064,7 +2045,7 @@ init_keywords(vector keywords)
 	install_keyword("strict_timing", &def_strict_timing_handler, &snprint_def_strict_timing);
 	install_keyword("deferred_remove", &def_deferred_remove_handler, &snprint_def_deferred_remove);
 	install_keyword("partition_delimiter", &def_partition_delim_handler, &snprint_def_partition_delim);
-	install_keyword("config_dir", &def_config_dir_handler, &snprint_def_config_dir);
+	install_keyword("config_dir", &deprecated_config_dir_handler, &snprint_deprecated);
 	install_keyword("delay_watch_checks", &def_delay_watch_checks_handler, &snprint_def_delay_watch_checks);
 	install_keyword("delay_wait_checks", &def_delay_wait_checks_handler, &snprint_def_delay_wait_checks);
 	install_keyword("san_path_err_threshold", &def_san_path_err_threshold_handler, &snprint_def_san_path_err_threshold);
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index 4032641..b81fc9b 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -933,15 +933,7 @@ The default is: \fB<unset>\fR
 .
 .TP
 .B config_dir
-This option is deprecated, and will be removed in a future release.
-If set to anything other than "", multipath will search this directory
-alphabetically for file ending in ".conf" and it will read configuration
-information from them, just as if it was in \fI/etc/multipath.conf\fR.
-config_dir must either be "" or a fully qualified directory name.
-.RS
-.TP
-The default is: \fB/etc/multipath/conf.d/\fR
-.RE
+This option is not supported any more. The value is ignored.
 .
 .
 .TP
diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
index c07367f..645e356 100644
--- a/multipathd/uxlsnr.c
+++ b/multipathd/uxlsnr.c
@@ -91,7 +91,6 @@ static LIST_HEAD(clients);
 static struct pollfd *polls;
 static int notify_fd = -1;
 static int idle_fd = -1;
-static char *watch_config_dir;
 
 static bool _socket_client_is_root(int fd)
 {
@@ -167,7 +166,6 @@ void uxsock_cleanup(void *arg)
 
 	close(ux_sock);
 	close(notify_fd);
-	free(watch_config_dir);
 
 	list_for_each_entry_safe(client_loop, client_tmp, &clients, node) {
 		dead_client(client_loop);
@@ -213,16 +211,7 @@ static void reset_watch(int notify_fd, struct watch_descriptors *wds,
 		*sequence_nr = conf->sequence_nr;
 		if (wds->conf_wd == -1)
 			conf_reset = 1;
-		if (!watch_config_dir || !conf->config_dir ||
-		    strcmp(watch_config_dir, conf->config_dir)) {
-			dir_reset = 1;
-			if (watch_config_dir)
-				free(watch_config_dir);
-			if (conf->config_dir)
-				watch_config_dir = strdup(conf->config_dir);
-			else
-				watch_config_dir = NULL;
-		} else if (wds->dir_wd == -1)
+		if (wds->dir_wd == -1)
 			dir_reset = 1;
 	}
 	put_multipath_config(conf);
@@ -232,14 +221,12 @@ static void reset_watch(int notify_fd, struct watch_descriptors *wds,
 			inotify_rm_watch(notify_fd, wds->dir_wd);
 			wds->dir_wd = -1;
 		}
-		if (watch_config_dir) {
-			wds->dir_wd = inotify_add_watch(notify_fd,
-							watch_config_dir,
-							IN_CLOSE_WRITE |
-							IN_DELETE | IN_ONLYDIR);
-			if (wds->dir_wd == -1)
-				condlog(3, "didn't set up notifications on %s: %m", watch_config_dir);
-		}
+		wds->dir_wd = inotify_add_watch(notify_fd,
+						CONFIG_DIR,
+						IN_CLOSE_WRITE |
+						IN_DELETE | IN_ONLYDIR);
+		if (wds->dir_wd == -1)
+			condlog(3, "didn't set up notifications on %s: %m", CONFIG_DIR);
 	}
 	if (conf_reset) {
 		wds->conf_wd = inotify_add_watch(notify_fd, DEFAULT_CONFIGFILE,
-- 
2.35.1


[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [dm-devel] [PATCH 4/7] libmultipath: print error message for pg_timeout
  2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
                   ` (2 preceding siblings ...)
  2022-04-14 13:18 ` [dm-devel] [PATCH 3/7] multipath-tools: make config_dir " mwilck
@ 2022-04-14 13:18 ` mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 5/7] libmultipath: remove support for long-deprecated options mwilck
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mwilck @ 2022-04-14 13:18 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

[-- Attachment #1: Type: application/octet-stream, Size: 1535 bytes --]

From: Martin Wilck <mwilck@suse.com>

pg_timeout has been deprecated for a long time. Use the same approach
as for config_dir to warn about its use.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/dict.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index 91a0580..0cef9a7 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -847,6 +847,7 @@ declare_def_snprint_defstr(enable_foreign, print_str,
 			   DEFAULT_ENABLE_FOREIGN)
 
 declare_deprecated_handler(config_dir)
+declare_deprecated_handler(pg_timeout)
 
 #define declare_def_attr_handler(option, function)			\
 static int								\
@@ -2023,7 +2024,7 @@ init_keywords(vector keywords)
 	install_keyword("queue_without_daemon", &def_queue_without_daemon_handler, &snprint_def_queue_without_daemon);
 	install_keyword("checker_timeout", &def_checker_timeout_handler, &snprint_def_checker_timeout);
 	install_keyword("allow_usb_devices", &def_allow_usb_devices_handler, &snprint_def_allow_usb_devices);
-	install_keyword("pg_timeout", &deprecated_handler, &snprint_deprecated);
+	install_keyword("pg_timeout", &deprecated_pg_timeout_handler, &snprint_deprecated);
 	install_keyword("flush_on_last_del", &def_flush_on_last_del_handler, &snprint_def_flush_on_last_del);
 	install_keyword("user_friendly_names", &def_user_friendly_names_handler, &snprint_def_user_friendly_names);
 	install_keyword("mode", &def_mode_handler, &snprint_def_mode);
-- 
2.35.1


[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [dm-devel] [PATCH 5/7] libmultipath: remove support for long-deprecated options
  2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
                   ` (3 preceding siblings ...)
  2022-04-14 13:18 ` [dm-devel] [PATCH 4/7] libmultipath: print error message for pg_timeout mwilck
@ 2022-04-14 13:18 ` mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 6/7] multipath-tools: stop supporting getuid_callout mwilck
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mwilck @ 2022-04-14 13:18 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

[-- Attachment #1: Type: application/octet-stream, Size: 2724 bytes --]

From: Martin Wilck <mwilck@suse.com>

The following options have been superseded by their equivalents without
"default_" prefix for a very long time:

 - default_selector
 - default_path_grouping_policy
 - default_uid_attribute
 - default_getuid_callout
 - default_features
 - default_path_checker

Remove them.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/dict.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index 0cef9a7..c380350 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -1990,8 +1990,6 @@ snprint_deprecated (struct config *conf, struct strbuf *buff, const void * data)
 	return 0;
 }
 
-#define __deprecated
-
 /*
  * If you add or remove a keyword also update multipath/multipath.conf.5
  */
@@ -2074,12 +2072,6 @@ init_keywords(vector keywords)
 			&snprint_def_enable_foreign);
 	install_keyword("marginal_pathgroups", &def_marginal_pathgroups_handler, &snprint_def_marginal_pathgroups);
 	install_keyword("recheck_wwid", &def_recheck_wwid_handler, &snprint_def_recheck_wwid);
-	__deprecated install_keyword("default_selector", &def_selector_handler, NULL);
-	__deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
-	__deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL);
-	__deprecated install_keyword("default_getuid_callout", &def_getuid_handler, NULL);
-	__deprecated install_keyword("default_features", &def_features_handler, NULL);
-	__deprecated install_keyword("default_path_checker", &def_checker_name_handler, NULL);
 
 	install_keyword_root("blacklist", &blacklist_handler);
 	install_keyword_multi("devnode", &ble_blist_devnode_handler, &snprint_ble_simple);
@@ -2102,16 +2094,6 @@ init_keywords(vector keywords)
 	install_keyword("product", &ble_elist_device_product_handler, &snprint_bled_product);
 	install_sublevel_end();
 
-#if 0
-	__deprecated install_keyword_root("devnode_blacklist", &blacklist_handler);
-	__deprecated install_keyword("devnode", &ble_devnode_handler, &snprint_ble_simple);
-	__deprecated install_keyword("wwid", &ble_wwid_handler, &snprint_ble_simple);
-	__deprecated install_keyword("device", &ble_device_handler, NULL);
-	__deprecated install_sublevel();
-	__deprecated install_keyword("vendor", &ble_vendor_handler, &snprint_bled_vendor);
-	__deprecated install_keyword("product", &ble_product_handler, &snprint_bled_product);
-	__deprecated install_sublevel_end();
-#endif
 /*
  * If you add or remove a "device subsection" keyword also update
  * multipath/multipath.conf.5 and the TEMPLATE in libmultipath/hwtable.c
-- 
2.35.1


[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [dm-devel] [PATCH 6/7] multipath-tools: stop supporting getuid_callout
  2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
                   ` (4 preceding siblings ...)
  2022-04-14 13:18 ` [dm-devel] [PATCH 5/7] libmultipath: remove support for long-deprecated options mwilck
@ 2022-04-14 13:18 ` mwilck
  2022-04-14 13:18 ` [dm-devel] [PATCH 7/7] libmultipath.version: bump version mwilck
  2022-04-15  0:23 ` [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options Benjamin Marzinski
  7 siblings, 0 replies; 9+ messages in thread
From: mwilck @ 2022-04-14 13:18 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

[-- Attachment #1: Type: application/octet-stream, Size: 16766 bytes --]

From: Martin Wilck <mwilck@suse.com>

getuid_callout has been deprecated since 2013, commit d7dc36d ("multipath:
Deprecate 'getuid' configuration variable"). Stop using it for good.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/Makefile      |   2 +-
 libmultipath/callout.c     | 221 -------------------------------------
 libmultipath/callout.h     |   7 --
 libmultipath/config.c      |  14 ---
 libmultipath/config.h      |   3 -
 libmultipath/dict.c        |  15 +--
 libmultipath/discovery.c   |  22 +---
 libmultipath/propsel.c     |   8 +-
 libmultipath/structs.c     |   1 -
 libmultipath/structs.h     |   1 -
 multipath/multipath.conf.5 |  22 +---
 11 files changed, 11 insertions(+), 305 deletions(-)
 delete mode 100644 libmultipath/callout.c
 delete mode 100644 libmultipath/callout.h

diff --git a/libmultipath/Makefile b/libmultipath/Makefile
index 77e954a..b3a48c4 100644
--- a/libmultipath/Makefile
+++ b/libmultipath/Makefile
@@ -50,7 +50,7 @@ ifneq ($(call check_var,ELS_DTAG_LNK_INTEGRITY,$(LINUX_HEADERS_INCDIR)/scsi/fc/f
 endif
 
 
-OBJS = parser.o vector.o devmapper.o callout.o \
+OBJS = parser.o vector.o devmapper.o \
 	hwtable.o blacklist.o util.o dmparser.o config.o \
 	structs.o discovery.o propsel.o dict.o \
 	pgpolicies.o debug.o defaults.o uevent.o time-util.o \
diff --git a/libmultipath/callout.c b/libmultipath/callout.c
deleted file mode 100644
index 57c3481..0000000
--- a/libmultipath/callout.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Source: copy of the udev package source file
- *
- * Copyrights of the source file apply
- * Copyright (c) 2004 Christophe Varoqui
- */
-#include <stdio.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include <errno.h>
-
-#include "checkers.h"
-#include "vector.h"
-#include "structs.h"
-#include "util.h"
-#include "callout.h"
-#include "debug.h"
-
-int execute_program(char *path, char *value, int len)
-{
-	int retval;
-	int count;
-	int status;
-	int fds[2], null_fd;
-	pid_t pid;
-	char *pos;
-	char arg[CALLOUT_MAX_SIZE];
-	int argc = sizeof(arg) / 2;
-	char *argv[argc + 1];
-	int i;
-
-	i = 0;
-
-	if (strchr(path, ' ')) {
-		strlcpy(arg, path, sizeof(arg));
-		pos = arg;
-		while (pos != NULL && i < argc) {
-			if (pos[0] == '\'') {
-				/* don't separate if in apostrophes */
-				pos++;
-				argv[i] = strsep(&pos, "\'");
-				while (pos[0] == ' ')
-					pos++;
-			} else {
-				argv[i] = strsep(&pos, " ");
-			}
-			i++;
-		}
-	} else {
-		argv[i++] = path;
-	}
-	argv[i] =  NULL;
-
-	retval = pipe(fds);
-
-	if (retval != 0) {
-		condlog(0, "error creating pipe for callout: %s", strerror(errno));
-		return -1;
-	}
-
-	pid = fork();
-
-	switch(pid) {
-	case 0:
-		/* child */
-
-		/* dup write side of pipe to STDOUT */
-		if (dup2(fds[1], STDOUT_FILENO) < 0) {
-			condlog(1, "failed to dup2 stdout: %m");
-			return -1;
-		}
-		close(fds[0]);
-		close(fds[1]);
-
-		/* Ignore writes to stderr */
-		null_fd = open("/dev/null", O_WRONLY);
-		if (null_fd > 0) {
-			if (dup2(null_fd, STDERR_FILENO) < 0)
-				condlog(1, "failed to dup2 stderr: %m");
-			close(null_fd);
-		}
-
-		retval = execv(argv[0], argv);
-		condlog(0, "error execing %s : %s", argv[0], strerror(errno));
-		exit(-1);
-	case -1:
-		condlog(0, "fork failed: %s", strerror(errno));
-		close(fds[0]);
-		close(fds[1]);
-		return -1;
-	default:
-		/* parent reads from fds[0] */
-		close(fds[1]);
-		retval = 0;
-		i = 0;
-		while (1) {
-			count = read(fds[0], value + i, len - i-1);
-			if (count <= 0)
-				break;
-
-			i += count;
-			if (i >= len-1) {
-				condlog(0, "not enough space for response from %s", argv[0]);
-				retval = -1;
-				break;
-			}
-		}
-
-		if (count < 0) {
-			condlog(0, "no response from %s", argv[0]);
-			retval = -1;
-		}
-
-		if (i > 0 && value[i-1] == '\n')
-			i--;
-		value[i] = '\0';
-
-		wait(&status);
-		close(fds[0]);
-
-		retval = -1;
-		if (WIFEXITED(status)) {
-			status = WEXITSTATUS(status);
-			if (status == 0)
-				retval = 0;
-			else
-				condlog(0, "%s exited with %d", argv[0], status);
-		}
-		else if (WIFSIGNALED(status))
-			condlog(0, "%s was terminated by signal %d", argv[0], WTERMSIG(status));
-		else
-			condlog(0, "%s terminated abnormally", argv[0]);
-	}
-	return retval;
-}
-
-int apply_format(char * string, char * cmd, struct path * pp)
-{
-	char * pos;
-	char * dst;
-	char * p;
-	char * q;
-	int len;
-	int myfree;
-
-	if (!string)
-		return 1;
-
-	if (!cmd)
-		return 1;
-
-	dst = cmd;
-	p = dst;
-	pos = strchr(string, '%');
-	myfree = CALLOUT_MAX_SIZE;
-
-	if (!pos) {
-		strlcpy(dst, string, CALLOUT_MAX_SIZE);
-		return 0;
-	}
-
-	len = (int) (pos - string) + 1;
-	myfree -= len;
-
-	if (myfree < 2)
-		return 1;
-
-	snprintf(p, len, "%s", string);
-	p += len - 1;
-	pos++;
-
-	switch (*pos) {
-	case 'n':
-		len = strlen(pp->dev) + 1;
-		myfree -= len;
-
-		if (myfree < 2)
-			return 1;
-
-		snprintf(p, len, "%s", pp->dev);
-		for (q = p; q < p + len; q++) {
-			if (q && *q == '!')
-				*q = '/';
-		}
-		p += len - 1;
-		break;
-	case 'd':
-		len = strlen(pp->dev_t) + 1;
-		myfree -= len;
-
-		if (myfree < 2)
-			return 1;
-
-		snprintf(p, len, "%s", pp->dev_t);
-		p += len - 1;
-		break;
-	default:
-		break;
-	}
-	pos++;
-
-	if (!*pos) {
-		condlog(3, "formatted callout = %s", dst);
-		return 0;
-	}
-
-	len = strlen(pos) + 1;
-	myfree -= len;
-
-	if (myfree < 2)
-		return 1;
-
-	snprintf(p, len, "%s", pos);
-	condlog(3, "reformatted callout = %s", dst);
-	return 0;
-}
diff --git a/libmultipath/callout.h b/libmultipath/callout.h
deleted file mode 100644
index ab648e8..0000000
--- a/libmultipath/callout.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _CALLOUT_H
-#define _CALLOUT_H
-
-int execute_program(char *, char *, int);
-int apply_format (char *, char *, struct path *);
-
-#endif /* _CALLOUT_H */
diff --git a/libmultipath/config.c b/libmultipath/config.c
index 5478c1d..51b35cf 100644
--- a/libmultipath/config.c
+++ b/libmultipath/config.c
@@ -264,9 +264,6 @@ free_hwe (struct hwentry * hwe)
 	if (hwe->revision)
 		free(hwe->revision);
 
-	if (hwe->getuid)
-		free(hwe->getuid);
-
 	if (hwe->uid_attribute)
 		free(hwe->uid_attribute);
 
@@ -327,9 +324,6 @@ free_mpe (struct mpentry * mpe)
 	if (mpe->selector)
 		free(mpe->selector);
 
-	if (mpe->getuid)
-		free(mpe->getuid);
-
 	if (mpe->uid_attribute)
 		free(mpe->uid_attribute);
 
@@ -435,7 +429,6 @@ merge_hwe (struct hwentry * dst, struct hwentry * src)
 	merge_str(vendor);
 	merge_str(product);
 	merge_str(revision);
-	merge_str(getuid);
 	merge_str(uid_attribute);
 	merge_str(features);
 	merge_str(hwhandler);
@@ -487,7 +480,6 @@ merge_mpe(struct mpentry *dst, struct mpentry *src)
 {
 	merge_str(alias);
 	merge_str(uid_attribute);
-	merge_str(getuid);
 	merge_str(selector);
 	merge_str(features);
 	merge_str(prio_name);
@@ -579,9 +571,6 @@ store_hwe (vector hwtable, struct hwentry * dhwe)
 	if (dhwe->uid_attribute && !(hwe->uid_attribute = set_param_str(dhwe->uid_attribute)))
 		goto out;
 
-	if (dhwe->getuid && !(hwe->getuid = set_param_str(dhwe->getuid)))
-		goto out;
-
 	if (dhwe->features && !(hwe->features = set_param_str(dhwe->features)))
 		goto out;
 
@@ -742,9 +731,6 @@ static void _uninit_config(struct config *conf)
 		free(ptr);
 	vector_reset(&conf->uid_attrs);
 
-	if (conf->getuid)
-		free(conf->getuid);
-
 	if (conf->features)
 		free(conf->features);
 
diff --git a/libmultipath/config.h b/libmultipath/config.h
index 4d001e4..1520df7 100644
--- a/libmultipath/config.h
+++ b/libmultipath/config.h
@@ -52,7 +52,6 @@ struct hwentry {
 	char * product;
 	char * revision;
 	char * uid_attribute;
-	char * getuid;
 	char * features;
 	char * hwhandler;
 	char * selector;
@@ -100,7 +99,6 @@ struct mpentry {
 	char * wwid;
 	char * alias;
 	char * uid_attribute;
-	char * getuid;
 	char * selector;
 	char * features;
 
@@ -201,7 +199,6 @@ struct config {
 	char * selector;
 	struct _vector uid_attrs;
 	char * uid_attribute;
-	char * getuid;
 	char * features;
 	char * hwhandler;
 	char * bindings_file;
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index c380350..ad049cc 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -635,13 +635,6 @@ declare_ovr_snprint(uid_attribute, print_str)
 declare_hw_handler(uid_attribute, set_str)
 declare_hw_snprint(uid_attribute, print_str)
 
-declare_def_handler(getuid, set_str)
-declare_def_snprint(getuid, print_str)
-declare_ovr_handler(getuid, set_str)
-declare_ovr_snprint(getuid, print_str)
-declare_hw_handler(getuid, set_str)
-declare_hw_snprint(getuid, print_str)
-
 declare_def_handler(prio_name, set_str)
 declare_def_snprint_defstr(prio_name, print_str, DEFAULT_PRIO)
 declare_ovr_handler(prio_name, set_str)
@@ -1990,6 +1983,8 @@ snprint_deprecated (struct config *conf, struct strbuf *buff, const void * data)
 	return 0;
 }
 
+declare_deprecated_handler(getuid_callout)
+
 /*
  * If you add or remove a keyword also update multipath/multipath.conf.5
  */
@@ -2006,7 +2001,7 @@ init_keywords(vector keywords)
 	install_keyword("path_grouping_policy", &def_pgpolicy_handler, &snprint_def_pgpolicy);
 	install_keyword("uid_attrs", &uid_attrs_handler, &snprint_uid_attrs);
 	install_keyword("uid_attribute", &def_uid_attribute_handler, &snprint_def_uid_attribute);
-	install_keyword("getuid_callout", &def_getuid_handler, &snprint_def_getuid);
+	install_keyword("getuid_callout", &deprecated_getuid_callout_handler, &snprint_deprecated);
 	install_keyword("prio", &def_prio_name_handler, &snprint_def_prio_name);
 	install_keyword("prio_args", &def_prio_args_handler, &snprint_def_prio_args);
 	install_keyword("features", &def_features_handler, &snprint_def_features);
@@ -2107,7 +2102,7 @@ init_keywords(vector keywords)
 	install_keyword("product_blacklist", &hw_bl_product_handler, &snprint_hw_bl_product);
 	install_keyword("path_grouping_policy", &hw_pgpolicy_handler, &snprint_hw_pgpolicy);
 	install_keyword("uid_attribute", &hw_uid_attribute_handler, &snprint_hw_uid_attribute);
-	install_keyword("getuid_callout", &hw_getuid_handler, &snprint_hw_getuid);
+	install_keyword("getuid_callout", &deprecated_getuid_callout_handler, &snprint_deprecated);
 	install_keyword("path_selector", &hw_selector_handler, &snprint_hw_selector);
 	install_keyword("path_checker", &hw_checker_name_handler, &snprint_hw_checker_name);
 	install_keyword("checker", &hw_checker_name_handler, NULL);
@@ -2151,7 +2146,7 @@ init_keywords(vector keywords)
 	install_keyword_root("overrides", &overrides_handler);
 	install_keyword("path_grouping_policy", &ovr_pgpolicy_handler, &snprint_ovr_pgpolicy);
 	install_keyword("uid_attribute", &ovr_uid_attribute_handler, &snprint_ovr_uid_attribute);
-	install_keyword("getuid_callout", &ovr_getuid_handler, &snprint_ovr_getuid);
+	install_keyword("getuid_callout", &deprecated_getuid_callout_handler, &snprint_deprecated);
 	install_keyword("path_selector", &ovr_selector_handler, &snprint_ovr_selector);
 	install_keyword("path_checker", &ovr_checker_name_handler, &snprint_ovr_checker_name);
 	install_keyword("checker", &ovr_checker_name_handler, NULL);
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index ec4151c..0d8a558 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -21,7 +21,6 @@
 #include "structs.h"
 #include "config.h"
 #include "blacklist.h"
-#include "callout.h"
 #include "debug.h"
 #include "propsel.h"
 #include "sg_include.h"
@@ -2210,7 +2209,7 @@ get_uid (struct path * pp, int path_state, struct udev_device *udev,
 	int used_fallback = 0;
 	size_t i;
 
-	if (!pp->uid_attribute && !pp->getuid) {
+	if (!pp->uid_attribute) {
 		conf = get_multipath_config();
 		pthread_cleanup_push(put_multipath_config, conf);
 		select_getuid(conf, pp);
@@ -2219,24 +2218,7 @@ get_uid (struct path * pp, int path_state, struct udev_device *udev,
 	}
 
 	memset(pp->wwid, 0, WWID_SIZE);
-	if (pp->getuid) {
-		char buff[CALLOUT_MAX_SIZE];
-
-		/* Use 'getuid' callout, deprecated */
-		condlog(1, "%s: using deprecated getuid callout", pp->dev);
-		if (path_state != PATH_UP) {
-			condlog(3, "%s: path inaccessible", pp->dev);
-			len = -EWOULDBLOCK;
-		} else if (apply_format(pp->getuid, &buff[0], pp)) {
-			condlog(0, "error formatting uid callout command");
-			len = -EINVAL;
-		} else if (execute_program(buff, pp->wwid, WWID_SIZE)) {
-			condlog(3, "error calling out %s", buff);
-			len = -EIO;
-		} else
-			len = strlen(pp->wwid);
-		origin = "callout";
-	} else if (pp->uid_attribute) {
+	if (pp->uid_attribute) {
 		/* if the uid_attribute is an empty string skip udev checking */
 		bool check_uid_attr = udev && *pp->uid_attribute;
 
diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
index 84da96e..50d0b5c 100644
--- a/libmultipath/propsel.c
+++ b/libmultipath/propsel.c
@@ -589,20 +589,14 @@ int select_getuid(struct config *conf, struct path *pp)
 		goto out;
 	}
 
-	pp_set_ovr(getuid);
 	pp_set_ovr(uid_attribute);
-	pp_set_hwe(getuid);
 	pp_set_hwe(uid_attribute);
-	pp_set_conf(getuid);
 	pp_set_conf(uid_attribute);
 	pp_set_default(uid_attribute, DEFAULT_UID_ATTRIBUTE);
 out:
 	if (pp->uid_attribute)
 		condlog(3, "%s: uid_attribute = %s %s", pp->dev,
 			pp->uid_attribute, origin);
-	else if (pp->getuid)
-		condlog(3, "%s: getuid = \"%s\" %s", pp->dev, pp->getuid,
-			origin);
 	return 0;
 }
 
@@ -617,7 +611,7 @@ int select_recheck_wwid(struct config *conf, struct path * pp)
 	pp_set_default(recheck_wwid, DEFAULT_RECHECK_WWID);
 out:
 	if (pp->recheck_wwid == RECHECK_WWID_ON &&
-	    (pp->bus != SYSFS_BUS_SCSI || pp->getuid != NULL ||
+	    (pp->bus != SYSFS_BUS_SCSI ||
 	     !has_uid_fallback(pp))) {
 		pp->recheck_wwid = RECHECK_WWID_OFF;
 		origin = "(setting: unsupported by device type/config)";
diff --git a/libmultipath/structs.c b/libmultipath/structs.c
index 2c9be04..49621cb 100644
--- a/libmultipath/structs.c
+++ b/libmultipath/structs.c
@@ -139,7 +139,6 @@ uninitialize_path(struct path *pp)
 
 	pp->dmstate = PSTATE_UNDEF;
 	pp->uid_attribute = NULL;
-	pp->getuid = NULL;
 
 	if (checker_selected(&pp->checker))
 		checker_put(&pp->checker);
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
index 38aba34..a6a0944 100644
--- a/libmultipath/structs.h
+++ b/libmultipath/structs.h
@@ -329,7 +329,6 @@ struct path {
 	int detect_checker;
 	int tpgs;
 	const char *uid_attribute;
-	char * getuid;
 	struct prio prio;
 	struct checker checker;
 	struct multipath * mpp;
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index b81fc9b..fe838e3 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -283,12 +283,7 @@ The default is: \fBID_WWN\fR, for NVMe devices
 .
 .TP
 .B getuid_callout
-(Superseded by \fIuid_attribute\fR) The default program and args to callout
-to obtain a unique path identifier. Should be specified with an absolute path.
-.RS
-.TP
-The default is: \fB<unset>\fR
-.RE
+This option is not supported any more. The value is ignored.
 .
 .
 .TP
@@ -1598,8 +1593,6 @@ section:
 .TP
 .B uid_attribute
 .TP
-.B getuid_callout
-.TP
 .B path_selector
 .TP
 .B path_checker
@@ -1682,8 +1675,6 @@ the values are taken from the \fIdevices\fR or \fIdefaults\fR sections:
 .TP
 .B uid_attribute
 .TP
-.B getuid_callout
-.TP
 .B path_selector
 .TP
 .B path_checker
@@ -1800,18 +1791,9 @@ The WWID is generated by four methods (in the order of preference):
 The WWID is derived from udev attributes by matching the device node name; cf
 \fIuid_attrs\fR above.
 .TP
-.B getuid_callout
-Use the specified external program; cf \fIgetuid_callout\fR above.
-Care should be taken when using this method; the external program
-needs to be loaded from disk for execution, which might lead to
-deadlock situations in an all-paths-down scenario.
-.TP
 .B uid_attribute
 Use the value of the specified udev attribute; cf \fIuid_attribute\fR
-above. This method is preferred to \fIgetuid_callout\fR as multipath
-does not need to call any external programs here. However, under
-certain circumstances udev might not be able to generate the requested
-variable.
+above.
 .TP
 .B sysfs
 Try to determine the WWID from sysfs attributes.
-- 
2.35.1


[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [dm-devel] [PATCH 7/7] libmultipath.version: bump version
  2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
                   ` (5 preceding siblings ...)
  2022-04-14 13:18 ` [dm-devel] [PATCH 6/7] multipath-tools: stop supporting getuid_callout mwilck
@ 2022-04-14 13:18 ` mwilck
  2022-04-15  0:23 ` [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options Benjamin Marzinski
  7 siblings, 0 replies; 9+ messages in thread
From: mwilck @ 2022-04-14 13:18 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

[-- Attachment #1: Type: application/octet-stream, Size: 1050 bytes --]

From: Martin Wilck <mwilck@suse.com>

After the recent changes related to protocol-specific path properties
and removal/deprecation of various options, both struct path and struct
multipath have changed, requiring an ABI change.

Note: abigail also detects changes in libmpathpersist, but they only
apply to internally used functions. As far as the public libmpathpersist
API is concerned, struct multipath is opaque. It's only written or read
by calls into libmultipath.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/libmultipath.version | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/libmultipath.version b/libmultipath/libmultipath.version
index 8132df7..b3690ac 100644
--- a/libmultipath/libmultipath.version
+++ b/libmultipath/libmultipath.version
@@ -31,7 +31,7 @@
  *   The new version inherits the previous ones.
  */
 
-LIBMULTIPATH_14.1.0 {
+LIBMULTIPATH_15.0.0 {
 global:
 	/* symbols referenced by multipath and multipathd */
 	add_foreign;
-- 
2.35.1


[-- Attachment #2: Type: text/plain, Size: 98 bytes --]

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options
  2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
                   ` (6 preceding siblings ...)
  2022-04-14 13:18 ` [dm-devel] [PATCH 7/7] libmultipath.version: bump version mwilck
@ 2022-04-15  0:23 ` Benjamin Marzinski
  7 siblings, 0 replies; 9+ messages in thread
From: Benjamin Marzinski @ 2022-04-15  0:23 UTC (permalink / raw)
  To: mwilck; +Cc: dm-devel

On Thu, Apr 14, 2022 at 03:18:04PM +0200, mwilck@suse.com wrote:
For the set:
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-15  0:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14 13:18 [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options mwilck
2022-04-14 13:18 ` [dm-devel] [PATCH 1/7] libmultipath: add declare_deprecated_handler() helper mwilck
2022-04-14 13:18 ` [dm-devel] [PATCH 2/7] multipath-tools: make multipath_dir a compiled-in option mwilck
2022-04-14 13:18 ` [dm-devel] [PATCH 3/7] multipath-tools: make config_dir " mwilck
2022-04-14 13:18 ` [dm-devel] [PATCH 4/7] libmultipath: print error message for pg_timeout mwilck
2022-04-14 13:18 ` [dm-devel] [PATCH 5/7] libmultipath: remove support for long-deprecated options mwilck
2022-04-14 13:18 ` [dm-devel] [PATCH 6/7] multipath-tools: stop supporting getuid_callout mwilck
2022-04-14 13:18 ` [dm-devel] [PATCH 7/7] libmultipath.version: bump version mwilck
2022-04-15  0:23 ` [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options Benjamin Marzinski

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.