Skip to contentSkip to conversation

minio cleanup patches.

PATCH Superseded Benjamin Marzinski 3 participants 12 messages Jun 15 – Jul 21 Device mapper

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

cover minio cleanup patches.

This patchset is to deprecate the rr_weight, rr_min_io_rq, and rr_min_io multipath config options. It's a companion of the patchset to handle their deprecation in the man pages.
https://lore.kernel.org/all/[email protected]/

It does not completely remove the minio setting code, since there are ideas for reusing this in the future. The final patch is simply a change to avoid a kernel warning message that I hit while testing these patches.

Benjamin Marzinski (4):
libmultipath: deprecate rr_weight, and make it do nothing
libmultipath: deprecate rr_min_io_rq, and make it do nothing
libmultipath: deprecate rr_min_io
libmultipath: don't set hwhander for bio based devices

 libmultipath/config.c    |  6 ---
 libmultipath/config.h    |  6 ---
 libmultipath/configure.c |  1 -
 libmultipath/defaults.h  |  2 +-
 libmultipath/dict.c      | 90 +++++++---------------------------------
 libmultipath/dmparser.c  | 28 +------------
 libmultipath/hwtable.c   |  3 --
 libmultipath/propsel.c   | 54 ++++++------------------
 libmultipath/propsel.h   |  1 -
 libmultipath/structs.h   |  1 -
 tests/hwtable.c          | 13 ++----
 tests/test-lib.c         |  1 -
 12 files changed, 33 insertions(+), 173 deletions(-)
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 1/4 libmultipath: deprecate rr_weight, and make it do nothing

Since the kernel has required paths to have a minio of 1 for a long time now, rr_weight is completely useless. Remove all the code for it, and deprecate the option.

---
 libmultipath/config.c    |  3 ---
 libmultipath/config.h    |  3 ---
 libmultipath/configure.c |  1 -
 libmultipath/dict.c      | 54 ++++------------------------------------
 libmultipath/dmparser.c  | 16 +-----------
 libmultipath/hwtable.c   |  1 -
 libmultipath/propsel.c   | 22 ----------------
 libmultipath/propsel.h   |  1 -
 libmultipath/structs.h   |  1 -
 9 files changed, 6 insertions(+), 96 deletions(-)
libmultipath/config.c +0 -3
index f9198d60..c0be223a 100644
@@ -447,7 +447,6 @@ merge_hwe (struct hwentry * dst, struct hwentry * src)
 	merge_str(bl_product);
 	merge_num(pgpolicy);
 	merge_num(pgfailback);
-	merge_num(rr_weight);
 	merge_num(no_path_retry);
 	merge_num(minio);
 	merge_num(minio_rq);
@@ -505,7 +504,6 @@ merge_mpe(struct mpentry *dst, struct mpentry *src)
 
 	merge_num(pgpolicy);
 	merge_num(pgfailback);
-	merge_num(rr_weight);
 	merge_num(no_path_retry);
 	merge_num(minio);
 	merge_num(minio_rq);
@@ -616,7 +614,6 @@ store_hwe (vector hwtable, struct hwentry * dhwe)
 
 	hwe->pgpolicy = dhwe->pgpolicy;
 	hwe->pgfailback = dhwe->pgfailback;
-	hwe->rr_weight = dhwe->rr_weight;
 	hwe->no_path_retry = dhwe->no_path_retry;
 	hwe->minio = dhwe->minio;
 	hwe->minio_rq = dhwe->minio_rq;
libmultipath/config.h +0 -3
index 618fa572..3a08b701 100644
@@ -64,7 +64,6 @@ struct hwentry {
 
 	int pgpolicy;
 	int pgfailback;
-	int rr_weight;
 	int no_path_retry;
 	int minio;
 	int minio_rq;
@@ -114,7 +113,6 @@ struct mpentry {
 	uint8_t sa_flags;
 	int pgpolicy;
 	int pgfailback;
-	int rr_weight;
 	int no_path_retry;
 	int minio;
 	int minio_rq;
@@ -151,7 +149,6 @@ struct config {
 	unsigned int max_checkint;
 	unsigned int adjust_int;
 	int pgfailback;
-	int rr_weight;
 	int no_path_retry;
 	int user_friendly_names;
 	int bindings_read_only;
libmultipath/configure.c +0 -1
index a954ca31..9d6aec4d 100644
@@ -336,7 +336,6 @@ int setup_map(struct multipath *mpp, char **params, struct vectors *vecs)
 	else
 		free(save_attr);
 
-	select_rr_weight(conf, mpp);
 	select_minio(conf, mpp);
 	select_mode(conf, mpp);
 	select_uid(conf, mpp);
libmultipath/dict.c +5 -49

90 lines not on this page · raw message

libmultipath/dmparser.c +1 -15
index 3411bd00..97300668 100644
@@ -89,16 +89,11 @@ int assemble_map(struct multipath *mp, char **params)
 			goto err;
 
 		vector_foreach_slot (pgp->paths, pp, j) {
-			int tmp_minio = minio;
-
-			if (mp->rr_weight == RR_WEIGHT_PRIO
-			    && pp->priority > 0)
-				tmp_minio = minio * pp->priority;
 			if (!strlen(pp->dev_t) ) {
 				condlog(0, "dev_t not set for '%s'", pp->dev);
 				goto err;
 			}
-			if (print_strbuf(&buff, " %s %d", pp->dev_t, tmp_minio) < 0)
+			if (print_strbuf(&buff, " %s %d", pp->dev_t, minio) < 0)
 				goto err;
 		}
 	}
@@ -315,15 +310,6 @@ int disassemble_map(const struct vector_s *pathvec,
 					def_minio = atoi(word);
 					free(word);
 
-					if (!strncmp(mpp->selector,
-						     "round-robin", 11)) {
-
-						if (mpp->rr_weight == RR_WEIGHT_PRIO
-						    && pp->priority > 0)
-							def_minio /= pp->priority;
-
-					}
-
 					if (def_minio != mpp->minio)
 						mpp->minio = def_minio;
 				}
libmultipath/hwtable.c +0 -1
index 23c54933..949ccb33 100644
@@ -56,7 +56,6 @@
 		.prio_name     = PRIO_CONST,
 		.prio_args     = "",
 		.pgfailback    = -FAILBACK_MANUAL,
-		.rr_weight     = RR_WEIGHT_NONE,
 		.no_path_retry = NO_PATH_RETRY_UNDEF,
 		.minio         = 1000,
 		.minio_rq      = 1,
libmultipath/propsel.c +0 -22
index 0c10ebc1..bc5aae7d 100644
@@ -211,28 +211,6 @@ out:
 	return 0;
 }
 
-/*
- * selectors :
- * traverse the configuration layers from most specific to most generic
- * stop at first explicit setting found
- */
-int select_rr_weight(struct config *conf, struct multipath * mp)
-{
-	const char *origin;
-	STRBUF_ON_STACK(buff);
-
-	mp_set_mpe(rr_weight);
-	mp_set_ovr(rr_weight);
-	mp_set_hwe(rr_weight);
-	mp_set_conf(rr_weight);
-	mp_set_default(rr_weight, DEFAULT_RR_WEIGHT);
-out:
-	print_rr_weight(&buff, mp->rr_weight);
-	condlog(3, "%s: rr_weight = %s %s", mp->alias,
-		get_strbuf_str(&buff), origin);
-	return 0;
-}
-
 int select_pgfailback(struct config *conf, struct multipath * mp)
 {
 	const char *origin;
libmultipath/propsel.h +0 -1
index bd20e39e..056e841e 100644
@@ -1,6 +1,5 @@
 #ifndef PROPSEL_H_INCLUDED
 #define PROPSEL_H_INCLUDED
-int select_rr_weight (struct config *conf, struct multipath * mp);
 int select_pgfailback (struct config *conf, struct multipath * mp);
 int select_detect_pgpolicy (struct config *conf, struct multipath * mp);
 int select_detect_pgpolicy_use_tpg (struct config *conf, struct multipath * mp);
libmultipath/structs.h +0 -1
index 9adedde2..127a1153 100644
@@ -483,7 +483,6 @@ struct multipath {
 	int uev_wait_tick;
 	int pgfailback;
 	int failback_tick;
-	int rr_weight;
 	int no_path_retry; /* number of retries after all paths are down */
 	int retry_tick;    /* remaining times for retries */
 	int disable_queueing;
Signature · 1 line
2.53.0
author maintainer
#2 lore raw

PATCH 2/4 libmultipath: deprecate rr_min_io_rq, and make it do nothing

In reply to Benjamin Marzinski

Since the kernel now requires paths to have a minio of 1, rr_min_io_rq is completely useless. Remove all the code for it, and deprecate the option.

---
 libmultipath/config.c  |  3 ---
 libmultipath/config.h  |  3 ---
 libmultipath/dict.c    | 18 +++++-------------
 libmultipath/hwtable.c |  1 -
 libmultipath/propsel.c | 20 ++++----------------
 tests/hwtable.c        | 13 +++----------
 6 files changed, 12 insertions(+), 46 deletions(-)
libmultipath/config.c +0 -3
index c0be223a..0d877422 100644
@@ -449,7 +449,6 @@ merge_hwe (struct hwentry * dst, struct hwentry * src)
 	merge_num(pgfailback);
 	merge_num(no_path_retry);
 	merge_num(minio);
-	merge_num(minio_rq);
 	merge_num(flush_on_last_del);
 	merge_num(fast_io_fail);
 	merge_num(dev_loss);
@@ -506,7 +505,6 @@ merge_mpe(struct mpentry *dst, struct mpentry *src)
 	merge_num(pgfailback);
 	merge_num(no_path_retry);
 	merge_num(minio);
-	merge_num(minio_rq);
 	merge_num(flush_on_last_del);
 	merge_num(attribute_flags);
 	merge_num(user_friendly_names);
@@ -616,7 +614,6 @@ store_hwe (vector hwtable, struct hwentry * dhwe)
 	hwe->pgfailback = dhwe->pgfailback;
 	hwe->no_path_retry = dhwe->no_path_retry;
 	hwe->minio = dhwe->minio;
-	hwe->minio_rq = dhwe->minio_rq;
 	hwe->flush_on_last_del = dhwe->flush_on_last_del;
 	hwe->fast_io_fail = dhwe->fast_io_fail;
 	hwe->dev_loss = dhwe->dev_loss;
libmultipath/config.h +0 -3
index 3a08b701..ad3b2423 100644
@@ -66,7 +66,6 @@ struct hwentry {
 	int pgfailback;
 	int no_path_retry;
 	int minio;
-	int minio_rq;
 	int flush_on_last_del;
 	int fast_io_fail;
 	unsigned int dev_loss;
@@ -115,7 +114,6 @@ struct mpentry {
 	int pgfailback;
 	int no_path_retry;
 	int minio;
-	int minio_rq;
 	int flush_on_last_del;
 	int attribute_flags;
 	int user_friendly_names;
@@ -144,7 +142,6 @@ struct config {
 	int pgpolicy_flag;
 	int pgpolicy;
 	int minio;
-	int minio_rq;
 	unsigned int checkint;
 	unsigned int max_checkint;
 	unsigned int adjust_int;
libmultipath/dict.c +5 -13
index 502f54b2..3b6584ec 100644
@@ -755,15 +755,6 @@ declare_hw_snprint(minio, print_nonzero)
 declare_mp_range_handler(minio, 0, INT_MAX)
 declare_mp_snprint(minio, print_nonzero)
 
-declare_def_range_handler(minio_rq, 0, INT_MAX)
-declare_def_snprint_defint(minio_rq, print_int, DEFAULT_MINIO_RQ)
-declare_ovr_range_handler(minio_rq, 0, INT_MAX)
-declare_ovr_snprint(minio_rq, print_nonzero)
-declare_hw_range_handler(minio_rq, 0, INT_MAX)
-declare_hw_snprint(minio_rq, print_nonzero)
-declare_mp_range_handler(minio_rq, 0, INT_MAX)
-declare_mp_snprint(minio_rq, print_nonzero)
-
 declare_def_handler(queue_without_daemon, set_yes_no)
 static int
 snprint_def_queue_without_daemon(struct config *conf, struct strbuf *buff,
@@ -2117,6 +2108,7 @@ declare_deprecated_handler(pg_timeout, "(not set)")
 declare_deprecated_handler(bindings_file, DEFAULT_BINDINGS_FILE)
 declare_deprecated_handler(wwids_file, DEFAULT_WWIDS_FILE)
 declare_deprecated_handler(prkeys_file, DEFAULT_PRKEYS_FILE)
+declare_deprecated_handler(minio_rq, "1")
 declare_deprecated_handler(rr_weight, "uniform")
 
 /*
@@ -2144,7 +2136,7 @@ init_keywords(vector keywords)
 	install_keyword("alias_prefix", &def_alias_prefix_handler, &snprint_def_alias_prefix);
 	install_keyword("failback", &def_pgfailback_handler, &snprint_def_pgfailback);
 	install_keyword("rr_min_io", &def_minio_handler, &snprint_def_minio);
-	install_keyword("rr_min_io_rq", &def_minio_rq_handler, &snprint_def_minio_rq);
+	install_keyword("rr_min_io_rq", &deprecated_minio_rq_handler, &snprint_deprecated);
 	install_keyword("max_fds", &max_fds_handler, &snprint_max_fds);
 	install_keyword("rr_weight", &deprecated_rr_weight_handler, &snprint_deprecated);
 	install_keyword("no_path_retry", &def_no_path_retry_handler, &snprint_def_no_path_retry);
@@ -2254,7 +2246,7 @@ init_keywords(vector keywords)
 	install_keyword("rr_weight", &deprecated_rr_weight_handler, &snprint_deprecated);
 	install_keyword("no_path_retry", &hw_no_path_retry_handler, &snprint_hw_no_path_retry);
 	install_keyword("rr_min_io", &hw_minio_handler, &snprint_hw_minio);
-	install_keyword("rr_min_io_rq", &hw_minio_rq_handler, &snprint_hw_minio_rq);
+	install_keyword("rr_min_io_rq", &deprecated_minio_rq_handler, &snprint_deprecated);
 	install_keyword("pg_timeout", &deprecated_pg_timeout_handler, &snprint_deprecated);
 	install_keyword("flush_on_last_del", &hw_flush_on_last_del_handler, &snprint_hw_flush_on_last_del);
 	install_keyword("fast_io_fail_tmo", &hw_fast_io_fail_handler, &snprint_hw_fast_io_fail);
@@ -2300,7 +2292,7 @@ init_keywords(vector keywords)
 	install_keyword("rr_weight", &deprecated_rr_weight_handler, &snprint_deprecated);
 	install_keyword("no_path_retry", &ovr_no_path_retry_handler, &snprint_ovr_no_path_retry);
 	install_keyword("rr_min_io", &ovr_minio_handler, &snprint_ovr_minio);
-	install_keyword("rr_min_io_rq", &ovr_minio_rq_handler, &snprint_ovr_minio_rq);
+	install_keyword("rr_min_io_rq", &deprecated_minio_rq_handler, &snprint_deprecated);
 	install_keyword("flush_on_last_del", &ovr_flush_on_last_del_handler, &snprint_ovr_flush_on_last_del);
 	install_keyword("fast_io_fail_tmo", &ovr_fast_io_fail_handler, &snprint_ovr_fast_io_fail);
 	install_keyword("dev_loss_tmo", &ovr_dev_loss_handler, &snprint_ovr_dev_loss);
@@ -2349,7 +2341,7 @@ init_keywords(vector keywords)
 	install_keyword("rr_weight", &deprecated_rr_weight_handler, &snprint_deprecated);
 	install_keyword("no_path_retry", &mp_no_path_retry_handler, &snprint_mp_no_path_retry);
 	install_keyword("rr_min_io", &mp_minio_handler, &snprint_mp_minio);
-	install_keyword("rr_min_io_rq", &mp_minio_rq_handler, &snprint_mp_minio_rq);
+	install_keyword("rr_min_io_rq", &deprecated_minio_rq_handler, &snprint_deprecated);
 	install_keyword("pg_timeout", &deprecated_pg_timeout_handler, &snprint_deprecated);
 	install_keyword("flush_on_last_del", &mp_flush_on_last_del_handler, &snprint_mp_flush_on_last_del);
 	install_keyword("features", &mp_features_handler, &snprint_mp_features);
libmultipath/hwtable.c +0 -1
index 949ccb33..36646540 100644
@@ -58,7 +58,6 @@
 		.pgfailback    = -FAILBACK_MANUAL,
 		.no_path_retry = NO_PATH_RETRY_UNDEF,
 		.minio         = 1000,
-		.minio_rq      = 1,
 		.flush_on_last_del = FLUSH_UNUSED,
 		.user_friendly_names = USER_FRIENDLY_NAMES_OFF,
 		.fast_io_fail  = 5,
libmultipath/propsel.c +4 -16
index bc5aae7d..cc3146fb 100644
@@ -848,21 +848,6 @@ out:
 	return 0;
 }
 
-int
-select_minio_rq (struct config *conf, struct multipath * mp)
-{
-	const char *origin;
-
-	do_set(minio_rq, mp->mpe, mp->minio, multipaths_origin);
-	do_set(minio_rq, conf->overrides, mp->minio, overrides_origin);
-	do_set_from_hwe(minio_rq, mp, mp->minio, hwe_origin);
-	do_set(minio_rq, conf, mp->minio, conf_origin);
-	do_default(mp->minio, DEFAULT_MINIO_RQ);
-out:
-	condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin);
-	return 0;
-}
-
 int
 select_minio_bio (struct config *conf, struct multipath * mp)
 {
@@ -880,13 +865,16 @@ out:
 
 int select_minio(struct config *conf, struct multipath *mp)
 {
+	const char *origin;
 	unsigned int minv_dmrq[3] = {1, 1, 0}, version[3];
 
 	if (!libmp_get_version(DM_MPATH_TARGET_VERSION, version)
 	    && VERSION_GE(version, minv_dmrq))
-		return select_minio_rq(conf, mp);
+		do_default(mp->minio, DEFAULT_MINIO_RQ);
 	else
 		return select_minio_bio(conf, mp);
+	condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin);
+	return 0;
 }
 
 int select_fast_io_fail(struct config *conf, struct path *pp)
tests/hwtable.c +3 -10
index 6021bfd3..eb135da1 100644
@@ -406,7 +406,6 @@ static const char _checker[] = "path_checker";
 static const char _vpd_vnd[] = "vpd_vendor";
 static const char _uid_attr[] = "uid_attribute";
 static const char _bl_product[] = "product_blacklist";
-static const char _minio[] = "rr_min_io_rq";
 static const char _no_path_retry[] = "no_path_retry";
 
 /* Device identifiers */
@@ -441,7 +440,6 @@ static const struct key_value bl_bar = { _bl_product, "bar" };
 static const struct key_value bl_baz = { _bl_product, "baz" };
 static const struct key_value bl_barx = { _bl_product, "ba[[rxy]" };
 static const struct key_value bl_bazy = { _bl_product, "ba[zy]" };
-static const struct key_value minio_99 = { _minio, "99" };
 static const struct key_value npr_37 = { _no_path_retry, "37" };
 static const struct key_value npr_queue = { _no_path_retry, "queue" };
 
@@ -552,7 +550,6 @@ static void test_sanity_globals(void **state)
 	assert_string_not_equal(chk_hp.value, DEFAULT_CHECKER);
 	assert_int_not_equal(MULTIBUS, DEFAULT_PGPOLICY);
 	assert_int_not_equal(NO_PATH_RETRY_QUEUE, DEFAULT_NO_PATH_RETRY);
-	assert_int_not_equal(atoi(minio_99.value), DEFAULT_MINIO_RQ);
 	assert_int_not_equal(atoi(npr_37.value), DEFAULT_NO_PATH_RETRY);
 }
 
@@ -1566,7 +1563,6 @@ static void test_multipath_config(const struct hwt_state *hwt)
 	mp = mock_multipath(pp);
 	assert_ptr_not_equal(mp->mpe, NULL);
 	TEST_PROP(prio_name(&pp->prio), prio_rdac.value);
-	assert_int_equal(mp->minio, atoi(minio_99.value));
 	TEST_PROP(pp->uid_attribute, uid_baz.value);
 
 	/* test different wwid */
@@ -1574,14 +1570,13 @@ static void test_multipath_config(const struct hwt_state *hwt)
 	mp = mock_multipath(pp);
 	// assert_ptr_equal(mp->mpe, NULL);
 	TEST_PROP(prio_name(&pp->prio), prio_emc.value);
-	assert_int_equal(mp->minio, DEFAULT_MINIO_RQ);
 	TEST_PROP(pp->uid_attribute, uid_baz.value);
 }
 
 static int setup_multipath_config(void **state)
 {
 	struct hwt_state *hwt = CHECK_STATE(state);
-	const struct key_value kvm[] = { wwid_test, prio_rdac, minio_99 };
+	const struct key_value kvm[] = { wwid_test, prio_rdac };
 	const struct key_value kvp[] = { vnd_foo, prd_bar, prio_emc, uid_baz };
 
 	begin_config(hwt);
@@ -1612,14 +1607,13 @@ static void test_multipath_config_2(const struct hwt_state *hwt)
 	assert_ptr_not_equal(mp, NULL);
 	assert_ptr_not_equal(mp->mpe, NULL);
 	TEST_PROP(prio_name(&pp->prio), prio_rdac.value);
-	assert_int_equal(mp->minio, atoi(minio_99.value));
 	assert_int_equal(mp->no_path_retry, atoi(npr_37.value));
 }
 
 static int setup_multipath_config_2(void **state)
 {
 	const struct key_value kv1[] = { wwid_test, prio_rdac, npr_queue };
-	const struct key_value kv2[] = { wwid_test, minio_99, npr_37 };
+	const struct key_value kv2[] = { wwid_test, npr_37 };
 	struct hwt_state *hwt = CHECK_STATE(state);
 
 	begin_config(hwt);
@@ -1647,14 +1641,13 @@ static void test_multipath_config_3(const struct hwt_state *hwt)
 	assert_ptr_not_equal(mp, NULL);
 	assert_ptr_not_equal(mp->mpe, NULL);
 	TEST_PROP(prio_name(&pp->prio), prio_rdac.value);
-	assert_int_equal(mp->minio, atoi(minio_99.value));
 	assert_int_equal(mp->no_path_retry, atoi(npr_37.value));
 }
 
 static int setup_multipath_config_3(void **state)
 {
 	const struct key_value kv1[] = { wwid_test, prio_rdac, npr_queue };
-	const struct key_value kv2[] = { wwid_test, minio_99, npr_37 };
+	const struct key_value kv2[] = { wwid_test, npr_37 };
 	struct hwt_state *hwt = CHECK_STATE(state);
 
 	begin_config(hwt);
Signature · 1 line
2.53.0
author maintainer
#3 lore raw

PATCH 3/4 libmultipath: deprecate rr_min_io

In reply to Benjamin Marzinski

Since the kernel now requires paths to have a minio of 1, rr_min_io is currently useless. However, bio-based multipath performs significantly worse than request-based multipath. Part of that is because bio-based multipath will call the path selector to pick a new path for every bio, making it very unlikely that adjacent bios will be merged. So this patch leaves the bio-based minio code around, since we may revisit this in the future. It does disable setting the value in multipath.conf, and changes the default to 1. Also, it fixes select_minio() to actually check if the multipath device is bio-based or request-based, and it takes out the code for modifying the minio based on the status of the "least-pending" path selector, because that no longer exists.

---
 libmultipath/defaults.h |  2 +-
 libmultipath/dict.c     | 18 +++++-------------
 libmultipath/dmparser.c | 12 +-----------
 libmultipath/hwtable.c  |  1 -
 libmultipath/propsel.c  |  8 +++-----
 tests/test-lib.c        |  1 -
 6 files changed, 10 insertions(+), 32 deletions(-)
libmultipath/defaults.h +1 -1
index d80dd7d4..bb129e66 100644
@@ -16,7 +16,7 @@
 #define DEFAULT_ALIAS_PREFIX	"mpath"
 #define DEFAULT_FEATURES	"0"
 #define DEFAULT_HWHANDLER	"0"
-#define DEFAULT_MINIO		1000
+#define DEFAULT_MINIO		1
 #define DEFAULT_MINIO_RQ	1
 #define DEFAULT_PGPOLICY	FAILOVER
 #define DEFAULT_FAILBACK	-FAILBACK_MANUAL
libmultipath/dict.c +5 -13
index 3b6584ec..0e947b1d 100644
@@ -746,15 +746,6 @@ declare_ovr_snprint(checker_name, print_str)
 declare_hw_handler(checker_name, set_str)
 declare_hw_snprint(checker_name, print_str)
 
-declare_def_range_handler(minio, 0, INT_MAX)
-declare_def_snprint_defint(minio, print_int, DEFAULT_MINIO)
-declare_ovr_range_handler(minio, 0, INT_MAX)
-declare_ovr_snprint(minio, print_nonzero)
-declare_hw_range_handler(minio, 0, INT_MAX)
-declare_hw_snprint(minio, print_nonzero)
-declare_mp_range_handler(minio, 0, INT_MAX)
-declare_mp_snprint(minio, print_nonzero)
-
 declare_def_handler(queue_without_daemon, set_yes_no)
 static int
 snprint_def_queue_without_daemon(struct config *conf, struct strbuf *buff,
@@ -2108,6 +2099,7 @@ declare_deprecated_handler(pg_timeout, "(not set)")
 declare_deprecated_handler(bindings_file, DEFAULT_BINDINGS_FILE)
 declare_deprecated_handler(wwids_file, DEFAULT_WWIDS_FILE)
 declare_deprecated_handler(prkeys_file, DEFAULT_PRKEYS_FILE)
+declare_deprecated_handler(minio, "1")
 declare_deprecated_handler(minio_rq, "1")
 declare_deprecated_handler(rr_weight, "uniform")
 
@@ -2135,7 +2127,7 @@ init_keywords(vector keywords)
 	install_keyword("checker", &def_checker_name_handler, NULL);
 	install_keyword("alias_prefix", &def_alias_prefix_handler, &snprint_def_alias_prefix);
 	install_keyword("failback", &def_pgfailback_handler, &snprint_def_pgfailback);
-	install_keyword("rr_min_io", &def_minio_handler, &snprint_def_minio);
+	install_keyword("rr_min_io", &deprecated_minio_handler, &snprint_deprecated);
 	install_keyword("rr_min_io_rq", &deprecated_minio_rq_handler, &snprint_deprecated);
 	install_keyword("max_fds", &max_fds_handler, &snprint_max_fds);
 	install_keyword("rr_weight", &deprecated_rr_weight_handler, &snprint_deprecated);
@@ -2245,7 +2237,7 @@ init_keywords(vector keywords)
 	install_keyword("failback", &hw_pgfailback_handler, &snprint_hw_pgfailback);
 	install_keyword("rr_weight", &deprecated_rr_weight_handler, &snprint_deprecated);
 	install_keyword("no_path_retry", &hw_no_path_retry_handler, &snprint_hw_no_path_retry);
-	install_keyword("rr_min_io", &hw_minio_handler, &snprint_hw_minio);
+	install_keyword("rr_min_io", &deprecated_minio_handler, &snprint_deprecated);
 	install_keyword("rr_min_io_rq", &deprecated_minio_rq_handler, &snprint_deprecated);
 	install_keyword("pg_timeout", &deprecated_pg_timeout_handler, &snprint_deprecated);
 	install_keyword("flush_on_last_del", &hw_flush_on_last_del_handler, &snprint_hw_flush_on_last_del);
@@ -2291,7 +2283,7 @@ init_keywords(vector keywords)
 	install_keyword("failback", &ovr_pgfailback_handler, &snprint_ovr_pgfailback);
 	install_keyword("rr_weight", &deprecated_rr_weight_handler, &snprint_deprecated);
 	install_keyword("no_path_retry", &ovr_no_path_retry_handler, &snprint_ovr_no_path_retry);
-	install_keyword("rr_min_io", &ovr_minio_handler, &snprint_ovr_minio);
+	install_keyword("rr_min_io", &deprecated_minio_handler, &snprint_deprecated);
 	install_keyword("rr_min_io_rq", &deprecated_minio_rq_handler, &snprint_deprecated);
 	install_keyword("flush_on_last_del", &ovr_flush_on_last_del_handler, &snprint_ovr_flush_on_last_del);
 	install_keyword("fast_io_fail_tmo", &ovr_fast_io_fail_handler, &snprint_ovr_fast_io_fail);
@@ -2340,7 +2332,7 @@ init_keywords(vector keywords)
 	install_keyword("failback", &mp_pgfailback_handler, &snprint_mp_pgfailback);
 	install_keyword("rr_weight", &deprecated_rr_weight_handler, &snprint_deprecated);
 	install_keyword("no_path_retry", &mp_no_path_retry_handler, &snprint_mp_no_path_retry);
-	install_keyword("rr_min_io", &mp_minio_handler, &snprint_mp_minio);
+	install_keyword("rr_min_io", &deprecated_minio_handler, &snprint_deprecated);
 	install_keyword("rr_min_io_rq", &deprecated_minio_rq_handler, &snprint_deprecated);
 	install_keyword("pg_timeout", &deprecated_pg_timeout_handler, &snprint_deprecated);
 	install_keyword("flush_on_last_del", &mp_flush_on_last_del_handler, &snprint_mp_flush_on_last_del);
libmultipath/dmparser.c +1 -11
index 97300668..83760e30 100644
@@ -337,7 +337,6 @@ int disassemble_status(const char *params, struct multipath *mpp)
 	int num_pg;
 	int num_pg_args;
 	int num_paths;
-	int def_minio = 0;
 	struct path * pp;
 	struct pathgroup * pgp;
 
@@ -507,16 +506,7 @@ int disassemble_status(const char *params, struct multipath *mpp)
 			 * selector args
 			 */
 			for (k = 0; k < num_pg_args; k++) {
-				if (!strncmp(mpp->selector,
-					     "least-pending", 13)) {
-					p += get_word(p, &word);
-					if (sscanf(word,"%d:*d",
-						   &def_minio) == 1 &&
-					    def_minio != mpp->minio)
-							mpp->minio = def_minio;
-					free(word);
-				} else
-					p += get_word(p, NULL);
+				p += get_word(p, NULL);
 			}
 		}
 	}
libmultipath/hwtable.c +0 -1
index 36646540..a8fbfa70 100644
@@ -57,7 +57,6 @@
 		.prio_args     = "",
 		.pgfailback    = -FAILBACK_MANUAL,
 		.no_path_retry = NO_PATH_RETRY_UNDEF,
-		.minio         = 1000,
 		.flush_on_last_del = FLUSH_UNUSED,
 		.user_friendly_names = USER_FRIENDLY_NAMES_OFF,
 		.fast_io_fail  = 5,
libmultipath/propsel.c +3 -5
index cc3146fb..8be6f5e3 100644
@@ -866,13 +866,11 @@ out:
 int select_minio(struct config *conf, struct multipath *mp)
 {
 	const char *origin;
-	unsigned int minv_dmrq[3] = {1, 1, 0}, version[3];
 
-	if (!libmp_get_version(DM_MPATH_TARGET_VERSION, version)
-	    && VERSION_GE(version, minv_dmrq))
-		do_default(mp->minio, DEFAULT_MINIO_RQ);
-	else
+	if (mp->queue_mode == QUEUE_MODE_BIO)
 		return select_minio_bio(conf, mp);
+
+	do_default(mp->minio, DEFAULT_MINIO_RQ);
 	condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin);
 	return 0;
 }
tests/test-lib.c +0 -1
index ea99977f..03bc6c71 100644
@@ -414,7 +414,6 @@ struct multipath *mock_multipath__(struct vectors *vecs, struct path *pp)
 	select_no_path_retry(conf, mp);
 	will_return(__wrap_libmp_get_version, fake_dm_tgt_version);
 	select_retain_hwhandler(conf, mp);
-	will_return(__wrap_libmp_get_version, fake_dm_tgt_version);
 	select_minio(conf, mp);
 	put_multipath_config(conf);
 
Signature · 1 line
2.53.0
author maintainer
#4 lore raw

PATCH 4/4 libmultipath: don't set hwhander for bio based devices

In reply to Benjamin Marzinski

The kernel prints an error message when a bio-based multipath device sets a hardware handler, since bio-based devices only support using the already attached hardware handler as-is. Change select_hwhandler() to not set a hardware handler for bio-based devices.

---
 libmultipath/propsel.c | 6 ++++++
 1 file changed, 6 insertions(+)
libmultipath/propsel.c +6 -0
index 8be6f5e3..8531ca09 100644
@@ -560,6 +560,11 @@ int select_hwhandler(struct config *conf, struct multipath *mp)
 
 	dh_state = &handler[2];
 
+	if (mp->queue_mode == QUEUE_MODE_BIO) {
+		mp->hwhandler = DEFAULT_HWHANDLER;
+		origin = "(setting: disabled due to \"queue_mode bio\")";
+		goto set;
+	}
 	/*
 	 * TPGS_UNDEF means that ALUA support couldn't determined either way
 	 * yet, probably because the path was always down.
@@ -600,6 +605,7 @@ out:
 		mp->hwhandler = DEFAULT_HWHANDLER;
 		origin = tpgs_origin;
 	}
+set:
 	mp->hwhandler = strdup(mp->hwhandler);
 	condlog(3, "%s: hardware_handler = \"%s\" %s", mp->alias, mp->hwhandler,
 		origin);
Signature · 1 line
2.53.0
#5 lore raw
In reply to Benjamin Marzinski
Quoted 16 lines · Benjamin Marzinski

This patchset is to deprecate the rr_weight, rr_min_io_rq, and rr_min_io multipath config options. It's a companion of the patchset to handle their deprecation in the man pages.
https://lore.kernel.org/all/[email protected]/

It does not completely remove the minio setting code, since there are ideas for reusing this in the future. The final patch is simply a change to avoid a kernel warning message that I hit while testing these patches.

Benjamin Marzinski (4):
libmultipath: deprecate rr_weight, and make it do nothing
libmultipath: deprecate rr_min_io_rq, and make it do nothing
libmultipath: deprecate rr_min_io
libmultipath: don't set hwhander for bio based devices

Quoted 14 lines
  libmultipath/config.c    |  6 ---
  libmultipath/config.h    |  6 ---
  libmultipath/configure.c |  1 -
  libmultipath/defaults.h  |  2 +-
  libmultipath/dict.c      | 90 +++++++---------------------------------
  libmultipath/dmparser.c  | 28 +------------
  libmultipath/hwtable.c   |  3 --
  libmultipath/propsel.c   | 54 ++++++------------------
  libmultipath/propsel.h   |  1 -
  libmultipath/structs.h   |  1 -
  tests/hwtable.c          | 13 ++----
  tests/test-lib.c         |  1 -
  12 files changed, 33 insertions(+), 173 deletions(-)

Ben, thanks for this cleanup.

I ran grep to see what remains of these options in the codebase. Could you please check if any of the following occurrences should have been removed, or if they are intended to stay for now?

8<---

$ git grep -Ei "rr_weight|minio|min_io" | grep -vE "multipath.conf.5.in|deprecated"
libmultipath/config.c:  merge_num(minio);
libmultipath/config.c:  merge_num(minio);
libmultipath/config.c:  hwe->minio = dhwe->minio;
libmultipath/config.h:  int minio;
libmultipath/config.h:  int minio;
libmultipath/config.h:  int minio;
libmultipath/configure.c:       select_minio(conf, mpp);
libmultipath/configure.c:       if (cmpp->minio != mpp->minio) {
libmultipath/configure.c:               select_reload_action(mpp, "minio change");
libmultipath/defaults.h:#define DEFAULT_MINIO           1
libmultipath/defaults.h:#define DEFAULT_MINIO_RQ        1
libmultipath/defaults.h:#define DEFAULT_RR_WEIGHT       RR_WEIGHT_NONE
libmultipath/dict.h:int print_rr_weight(struct strbuf *buff, long v);
libmultipath/dmparser.c:        int minio;
libmultipath/dmparser.c:        minio = mp->minio;
libmultipath/dmparser.c:                        if (print_strbuf(&buff, " %s %d", pp->dev_t, minio) < 0)
libmultipath/dmparser.c:        int def_minio = 0;
libmultipath/dmparser.c:                                        def_minio = atoi(word);
libmultipath/dmparser.c:                                        if (def_minio != mpp->minio)
libmultipath/dmparser.c:                                                mpp->minio = def_minio;

libmultipath/prioritizers/path_latency.c:#define MIN_IO_NUM 20
libmultipath/prioritizers/path_latency.c: if ((io_num < MIN_IO_NUM) || (io_num > MAX_IO_NUM)) {
libmultipath/propsel.c:select_minio_bio (struct config *conf, struct multipath * mp) libmultipath/propsel.c: mp_set_mpe(minio);
libmultipath/propsel.c: mp_set_ovr(minio);
libmultipath/propsel.c: mp_set_hwe(minio);
libmultipath/propsel.c: mp_set_conf(minio);
libmultipath/propsel.c: mp_set_default(minio, DEFAULT_MINIO); libmultipath/propsel.c: condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin); libmultipath/propsel.c:int select_minio(struct config *conf, struct multipath *mp)
libmultipath/propsel.c: return select_minio_bio(conf, mp);
libmultipath/propsel.c: do_default(mp->minio, DEFAULT_MINIO_RQ); libmultipath/propsel.c: condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin); libmultipath/propsel.h:int select_minio(struct config *conf, struct multipath *mp); libmultipath/structs.h:enum rr_weight_mode {

libmultipath/structs.h: RR_WEIGHT_UNDEF,
libmultipath/structs.h: RR_WEIGHT_NONE,
libmultipath/structs.h: RR_WEIGHT_PRIO
libmultipath/structs.h: int minio;
tests/test-lib.c:       /* pretend new dm, use minio_rq,  */
tests/test-lib.c:       select_minio(conf, mp);

8<---

Regards.

author maintainer
#6 lore raw
Quoted 33 lines · Xose Vazquez Perez
Quoted 16 lines · Benjamin Marzinski

This patchset is to deprecate the rr_weight, rr_min_io_rq, and rr_min_io multipath config options. It's a companion of the patchset to handle their deprecation in the man pages.
https://lore.kernel.org/all/[email protected]/

It does not completely remove the minio setting code, since there are ideas for reusing this in the future. The final patch is simply a change to avoid a kernel warning message that I hit while testing these patches.

Benjamin Marzinski (4):
libmultipath: deprecate rr_weight, and make it do nothing
libmultipath: deprecate rr_min_io_rq, and make it do nothing
libmultipath: deprecate rr_min_io
libmultipath: don't set hwhander for bio based devices

Quoted 14 lines
  libmultipath/config.c    |  6 ---
  libmultipath/config.h    |  6 ---
  libmultipath/configure.c |  1 -
  libmultipath/defaults.h  |  2 +-
  libmultipath/dict.c      | 90 +++++++---------------------------------
  libmultipath/dmparser.c  | 28 +------------
  libmultipath/hwtable.c   |  3 --
  libmultipath/propsel.c   | 54 ++++++------------------
  libmultipath/propsel.h   |  1 -
  libmultipath/structs.h   |  1 -
  tests/hwtable.c          | 13 ++----
  tests/test-lib.c         |  1 -
  12 files changed, 33 insertions(+), 173 deletions(-)
Quoted 9 lines

Ben, thanks for this cleanup.

I ran grep to see what remains of these options in the codebase. Could you please check if any of the following occurrences should have been removed, or if they are intended to stay for now?

8<---

$ git grep -Ei "rr_weight|minio|min_io" | grep -vE "multipath.conf.5.in|deprecated"

Good catch. It appears I misses some things.

Quoted 9 lines
libmultipath/config.c:  merge_num(minio);
libmultipath/config.c:  merge_num(minio);
libmultipath/config.c:  hwe->minio = dhwe->minio;
libmultipath/config.h:  int minio;
libmultipath/config.h:  int minio;
libmultipath/config.h:  int minio;
libmultipath/configure.c:       select_minio(conf, mpp);
libmultipath/configure.c:       if (cmpp->minio != mpp->minio) {
libmultipath/configure.c:               select_reload_action(mpp, "minio change");
Quoted 5 lines

libmultipath/defaults.h:#define DEFAULT_MINIO 1
libmultipath/defaults.h:#define DEFAULT_MINIO_RQ 1

libmultipath/defaults.h:#define DEFAULT_RR_WEIGHT RR_WEIGHT_NONE
libmultipath/dict.h:int print_rr_weight(struct strbuf *buff, long v);

These were supposed to go.

Quoted 19 lines
libmultipath/dmparser.c:        int minio;
libmultipath/dmparser.c:        minio = mp->minio;
libmultipath/dmparser.c:                        if (print_strbuf(&buff, " %s %d", pp->dev_t, minio) < 0)
libmultipath/dmparser.c:        int def_minio = 0;
libmultipath/dmparser.c:                                        def_minio = atoi(word);
libmultipath/dmparser.c:                                        if (def_minio != mpp->minio)
libmultipath/dmparser.c:                                                mpp->minio = def_minio;

libmultipath/prioritizers/path_latency.c:#define MIN_IO_NUM 20
libmultipath/prioritizers/path_latency.c: if ((io_num < MIN_IO_NUM) || (io_num > MAX_IO_NUM)) {
libmultipath/propsel.c:select_minio_bio (struct config *conf, struct multipath * mp) libmultipath/propsel.c: mp_set_mpe(minio);
libmultipath/propsel.c: mp_set_ovr(minio);
libmultipath/propsel.c: mp_set_hwe(minio);
libmultipath/propsel.c: mp_set_conf(minio);
libmultipath/propsel.c: mp_set_default(minio, DEFAULT_MINIO); libmultipath/propsel.c: condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin); libmultipath/propsel.c:int select_minio(struct config *conf, struct multipath *mp)
libmultipath/propsel.c: return select_minio_bio(conf, mp);

Quoted 1 line

libmultipath/propsel.c: do_default(mp->minio, DEFAULT_MINIO_RQ);

This should be mp_set_default(). The generated code is the same, but there's no reason not to use the standard call here.

Quoted 7 lines

libmultipath/propsel.c: condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin); libmultipath/propsel.h:int select_minio(struct config *conf, struct multipath *mp);

libmultipath/structs.h:enum rr_weight_mode {
libmultipath/structs.h: RR_WEIGHT_UNDEF,
libmultipath/structs.h: RR_WEIGHT_NONE,
libmultipath/structs.h: RR_WEIGHT_PRIO

More missed rr_weight stuff.

Quoted 3 lines

libmultipath/structs.h: int minio;

tests/test-lib.c: /* pretend new dm, use minio_rq, */

This comment no longer makes any sense, since select_minio no longer checks the kernel version.

I'll clean these up and resend. If anyone has opinions on what I did choose to keep around (you could easily make an argument that DEFAULT_MINIO_RQ should go), let me know.

-Ben

Quoted 4 lines

tests/test-lib.c: select_minio(conf, mp);
8<---

Regards.

#7 lore raw
Quoted 19 lines · Benjamin Marzinski
Quoted 18 lines · Xose Vazquez Perez
Quoted 9 lines · Benjamin Marzinski

This patchset is to deprecate the rr_weight, rr_min_io_rq, and rr_min_io multipath config options. It's a companion of the patchset to handle their deprecation in the man pages.
https://lore.kernel.org/all/[email protected]/

It does not completely remove the minio setting code, since there are ideas for reusing this in the future. The final patch is simply a change to avoid a kernel warning message that I hit while testing these patches.

Ben, thanks for this cleanup.

I ran grep to see what remains of these options in the codebase. Could you please check if any of the following occurrences should have been removed, or if they are intended to stay for now?

Quoted 5 lines
Quoted 3 lines

8<---

$ git grep -Ei "rr_weight|minio|min_io" | grep -vE "multipath.conf.5.in|deprecated"

Good catch. It appears I misses some things.

I ran the following command to locate previous "deprecated keywords":

$ for i in $(git grep -h  deprecated libmultipath/dict.c | grep install_keyword | sort | uniq | awk -F\"  '{print $2}') ; do printf "\\n\n--- $i\n\n" ; git grep -i $i | grep -vE "install_keyword|multipath.conf.5.in|\.md|deprecated_handler" ; done

It looks like there is some leftover code that could also be cleaned up, such as:

--- disable_changed_wwids

libmultipath/defaults.h:#define DEFAULT_DISABLE_CHANGED_WWIDS 1

and also some checks in tests/hwtable.c.

Could you please take a look at these as well?

Regards.

#8 lore raw

Obsolete features (was Re: [PATCH 0/4] minio cleanup patches.)

Quoted 30 lines · Xose Vazquez Perez
Quoted 19 lines · Benjamin Marzinski
Quoted 18 lines · Xose Vazquez Perez
Quoted 9 lines · Benjamin Marzinski

This patchset is to deprecate the rr_weight, rr_min_io_rq, and rr_min_io multipath config options. It's a companion of the patchset to handle their deprecation in the man pages.
https://lore.kernel.org/all/[email protected]/

It does not completely remove the minio setting code, since there are ideas for reusing this in the future. The final patch is simply a change to avoid a kernel warning message that I hit while testing these patches.

Ben, thanks for this cleanup.

I ran grep to see what remains of these options in the codebase. Could you please check if any of the following occurrences should have been removed, or if they are intended to stay for now?

Quoted 5 lines
Quoted 3 lines

8<---

$ git grep -Ei "rr_weight|minio|min_io" | grep -vE "multipath.conf.5.in|deprecated"

Good catch. It appears I misses some things.

I ran the following command to locate previous "deprecated keywords":

$ for i in $(git grep -h  deprecated libmultipath/dict.c | grep install_keyword | sort | uniq | awk -F\"  '{print $2}') ; do printf "\\n\n--- $i\n\n" ; git grep -i $i | grep -vE "install_keyword| multipath.conf.5.in|\.md|deprecated_handler" ; done
Quoted 7 lines

It looks like there is some leftover code that could also be cleaned up, such as:

--- disable_changed_wwids

libmultipath/defaults.h:#define DEFAULT_DISABLE_CHANGED_WWIDS 1

and also some checks in tests/hwtable.c.

Is this still necessary in "write_defaults : tests/hwtable.c" ?

               { "bindings_file", NULL },
               { "config_dir", NULL },
               { "multipath_dir", NULL },

Another candidate to drop is the retain_attached_hw_handler infrastructure:
( grep -Eir "hwhandler|hw_handler" )
Since Linux 4.3, the kernel always enforces "retain_attached_hw_handler yes". Because this option is completely obsolete, could it be dropped from multipath-tools?

Regards.

author maintainer
#9 lore raw

Re: Obsolete features (was Re: [PATCH 0/4] minio cleanup patches.)

Quoted 36 lines · Xose Vazquez Perez
Quoted 34 lines · Xose Vazquez Perez
Quoted 19 lines · Benjamin Marzinski
Quoted 18 lines · Xose Vazquez Perez
Quoted 9 lines · Benjamin Marzinski

This patchset is to deprecate the rr_weight, rr_min_io_rq, and rr_min_io multipath config options. It's a companion of the patchset to handle their deprecation in the man pages.
https://lore.kernel.org/all/[email protected]/

It does not completely remove the minio setting code, since there are ideas for reusing this in the future. The final patch is simply a change to avoid a kernel warning message that I hit while testing these patches.

Ben, thanks for this cleanup.

I ran grep to see what remains of these options in the codebase. Could you please check if any of the following occurrences should have been removed, or if they are intended to stay for now?

Quoted 5 lines
Quoted 3 lines

8<---

$ git grep -Ei "rr_weight|minio|min_io" | grep -vE "multipath.conf.5.in|deprecated"

Good catch. It appears I misses some things.

I ran the following command to locate previous "deprecated keywords":

$ for i in $(git grep -h  deprecated libmultipath/dict.c | grep install_keyword | sort | uniq | awk -F\"  '{print $2}') ; do printf "\\n\n--- $i\n\n" ; git grep -i $i | grep -vE "install_keyword| multipath.conf.5.in|\.md|deprecated_handler" ; done

It looks like there is some leftover code that could also be cleaned up, such as:

--- disable_changed_wwids

Quoted 9 lines
Quoted 3 lines

libmultipath/defaults.h:#define DEFAULT_DISABLE_CHANGED_WWIDS 1

and also some checks in tests/hwtable.c.

Is this still necessary in "write_defaults : tests/hwtable.c" ?

               { "bindings_file", NULL },
               { "config_dir", NULL },
               { "multipath_dir", NULL },

Yeah. don't think we need to included deprecated config options in our tests, except possibly in a test to make sure that deprecated values aren't used.

Quoted 4 lines

Another candidate to drop is the retain_attached_hw_handler infrastructure:
( grep -Eir "hwhandler|hw_handler" )
Since Linux 4.3, the kernel always enforces "retain_attached_hw_handler yes". Because this option is completely obsolete, could it be dropped from multipath-tools?

I'm never sure how far back we need to support kernels. I could easily be convinced that we don't need to worry about kernels before 4.3 with the latest upstream code. If we still do care about 4.2, I would also be open to deprecating the option, and just always having it set to yes.

-Ben

Quoted 3 lines

Regards.

#10 lore raw

Re: Obsolete features (was Re: [PATCH 0/4] minio cleanup patches.)

Quoted 62 lines · Benjamin Marzinski
Quoted 51 lines · Xose Vazquez Perez
Quoted 49 lines · Xose Vazquez Perez
Quoted 27 lines · Benjamin Marzinski
Quoted 25 lines · Xose Vazquez Perez
Quoted 7 lines · Benjamin Marzinski

This patchset is to deprecate the rr_weight, rr_min_io_rq, and rr_min_io
multipath config options. It's a companion of the patchset to handle
their deprecation in the man pages.
https://lore.kernel.org/all/[email protected]/

Quoted 7 lines

It does not completely remove the minio setting code, since there are
ideas for reusing this in the future. The final patch is simply a change
to avoid a kernel warning message that I hit while testing these
patches.

Ben, thanks for this cleanup.

I ran grep to see what remains of these options in the codebase.
Could you please check if any of the following occurrences should have been
removed, or if they are intended to stay for now?

Quoted 6 lines
Quoted 4 lines

8<---

$ git grep -Ei "rr_weight|minio|min_io" | grep -vE
"multipath.conf.5.in|deprecated"

Good catch. It appears I misses some things.

I ran the following command to locate previous "deprecated keywords":

$ for i in $(git grep -h  deprecated libmultipath/dict.c | grep
install_keyword | sort | uniq | awk -F\"  '{print $2}') ; do
printf "\\n\n--- $i\n\n" ; git grep -i $i | grep -vE
"install_keyword| multipath.conf.5.in|\.md|deprecated_handler" ;
done

It looks like there is some leftover code that could also be cleaned up, such as:

--- disable_changed_wwids

Quoted 9 lines
Quoted 3 lines

libmultipath/defaults.h:#define DEFAULT_DISABLE_CHANGED_WWIDS 1

and also some checks in tests/hwtable.c.

Is this still necessary in "write_defaults : tests/hwtable.c" ?

               { "bindings_file", NULL },
               { "config_dir", NULL },
               { "multipath_dir", NULL },

Quoted 4 lines

Yeah. don't think we need to included deprecated config options in our
tests, except possibly in a test to make sure that deprecated values aren't used.

Embarassingly I don't fully recall why I put these items there, but I do recall that I had a reason. I'd rather keep them there unless they cause real breakage. The hwtable test is sensitive to small changes, and fixing it is cumbersome.

I'll remove them; if the CI still passes, fine; otherwise we'll have to postpone this.

Martin

Signature · 4 lines
Dr. Martin Wilck <[email protected]>
SUSE Software Solutions Germany GmbH, Frankenstr. 146, 90461 Nürnberg,
Germany
Geschäftsführer: Jochen Jaser, Andrew McDonald (HRB 36809,AG Nürnberg)
#11 lore raw

Re: Obsolete features (was Re: [PATCH 0/4] minio cleanup patches.)

In reply to Benjamin Marzinski
Quoted 11 lines · Benjamin Marzinski
Quoted 4 lines · Xose Vazquez Perez

Another candidate to drop is the retain_attached_hw_handler infrastructure:
( grep -Eir "hwhandler|hw_handler" )
Since Linux 4.3, the kernel always enforces "retain_attached_hw_handler yes". Because this option is completely obsolete, could it be dropped from multipath-tools?

I'm never sure how far back we need to support kernels. I could easily be convinced that we don't need to worry about kernels before 4.3 with the latest upstream code. If we still do care about 4.2, I would also be open to deprecating the option, and just always having it set to yes.

Only enterprise distributions with extended/long-term support use kernels older than 4.3:

* SLES 11-SP4: 3.0
* RHEL 7: 3.10
* Ubuntu 14.04 LTS: 3.13
(Note that even CIP long-term kernel starts at 4.4)

Furthermore, the code handling older kernel behavior for hw_handler is still properly maintained in the respective stable branches of
multipath-tools: stable-0.10.y through stable-0.15.y

Regards.