|
|
1eb31d |
---
|
|
|
1eb31d |
libmultipath/config.c | 1 +
|
|
|
1eb31d |
libmultipath/config.h | 1 +
|
|
|
1eb31d |
libmultipath/dict.c | 33 +++++++++++++++++++++++++++++++++
|
|
|
1eb31d |
libmultipath/discovery.c | 8 ++++++--
|
|
|
1eb31d |
multipath.conf.annotated | 10 ++++++++++
|
|
|
1eb31d |
multipath/multipath.conf.5 | 9 +++++++++
|
|
|
1eb31d |
6 files changed, 60 insertions(+), 2 deletions(-)
|
|
|
1eb31d |
|
|
|
1eb31d |
Index: multipath-tools-130222/libmultipath/config.c
|
|
|
1eb31d |
===================================================================
|
|
|
1eb31d |
--- multipath-tools-130222.orig/libmultipath/config.c
|
|
|
1eb31d |
+++ multipath-tools-130222/libmultipath/config.c
|
|
|
1eb31d |
@@ -556,6 +556,7 @@ load_config (char * file, struct udev *u
|
|
|
1eb31d |
conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER;
|
|
|
1eb31d |
conf->detect_prio = DEFAULT_DETECT_PRIO;
|
|
|
1eb31d |
conf->hw_strmatch = 0;
|
|
|
1eb31d |
+ conf->force_sync = 0;
|
|
|
1eb31d |
|
|
|
1eb31d |
/*
|
|
|
1eb31d |
* preload default hwtable
|
|
|
1eb31d |
Index: multipath-tools-130222/libmultipath/config.h
|
|
|
1eb31d |
===================================================================
|
|
|
1eb31d |
--- multipath-tools-130222.orig/libmultipath/config.h
|
|
|
1eb31d |
+++ multipath-tools-130222/libmultipath/config.h
|
|
|
1eb31d |
@@ -115,6 +115,7 @@ struct config {
|
|
|
1eb31d |
int reassign_maps;
|
|
|
1eb31d |
int retain_hwhandler;
|
|
|
1eb31d |
int detect_prio;
|
|
|
1eb31d |
+ int force_sync;
|
|
|
1eb31d |
unsigned int version[3];
|
|
|
1eb31d |
|
|
|
1eb31d |
char * dev;
|
|
|
1eb31d |
Index: multipath-tools-130222/libmultipath/dict.c
|
|
|
1eb31d |
===================================================================
|
|
|
1eb31d |
--- multipath-tools-130222.orig/libmultipath/dict.c
|
|
|
1eb31d |
+++ multipath-tools-130222/libmultipath/dict.c
|
|
|
1eb31d |
@@ -712,6 +712,29 @@ def_hw_strmatch_handler(vector strvec)
|
|
|
1eb31d |
return 0;
|
|
|
1eb31d |
}
|
|
|
1eb31d |
|
|
|
1eb31d |
+static int
|
|
|
1eb31d |
+def_force_sync_handler(vector strvec)
|
|
|
1eb31d |
+{
|
|
|
1eb31d |
+ char * buff;
|
|
|
1eb31d |
+
|
|
|
1eb31d |
+ buff = set_value(strvec);
|
|
|
1eb31d |
+
|
|
|
1eb31d |
+ if (!buff)
|
|
|
1eb31d |
+ return 1;
|
|
|
1eb31d |
+
|
|
|
1eb31d |
+ if ((strlen(buff) == 2 && !strcmp(buff, "no")) ||
|
|
|
1eb31d |
+ (strlen(buff) == 1 && !strcmp(buff, "0")))
|
|
|
1eb31d |
+ conf->force_sync = 0;
|
|
|
1eb31d |
+ else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) ||
|
|
|
1eb31d |
+ (strlen(buff) == 1 && !strcmp(buff, "1")))
|
|
|
1eb31d |
+ conf->force_sync = 1;
|
|
|
1eb31d |
+ else
|
|
|
1eb31d |
+ conf->force_sync = 0;
|
|
|
1eb31d |
+
|
|
|
1eb31d |
+ FREE(buff);
|
|
|
1eb31d |
+ return 0;
|
|
|
1eb31d |
+}
|
|
|
1eb31d |
+
|
|
|
1eb31d |
/*
|
|
|
1eb31d |
* blacklist block handlers
|
|
|
1eb31d |
*/
|
|
|
1eb31d |
@@ -2822,6 +2845,15 @@ snprint_def_hw_strmatch(char * buff, int
|
|
|
1eb31d |
}
|
|
|
1eb31d |
|
|
|
1eb31d |
static int
|
|
|
1eb31d |
+snprint_def_force_sync(char * buff, int len, void * data)
|
|
|
1eb31d |
+{
|
|
|
1eb31d |
+ if (conf->force_sync)
|
|
|
1eb31d |
+ return snprintf(buff, len, "yes");
|
|
|
1eb31d |
+ else
|
|
|
1eb31d |
+ return snprintf(buff, len, "no");
|
|
|
1eb31d |
+}
|
|
|
1eb31d |
+
|
|
|
1eb31d |
+static int
|
|
|
1eb31d |
snprint_ble_simple (char * buff, int len, void * data)
|
|
|
1eb31d |
{
|
|
|
1eb31d |
struct blentry * ble = (struct blentry *)data;
|
|
|
1eb31d |
@@ -2889,6 +2921,7 @@ init_keywords(void)
|
|
|
1eb31d |
install_keyword("retain_attached_hw_handler", &def_retain_hwhandler_handler, &snprint_def_retain_hwhandler_handler);
|
|
|
1eb31d |
install_keyword("detect_prio", &def_detect_prio_handler, &snprint_def_detect_prio);
|
|
|
1eb31d |
install_keyword("hw_str_match", &def_hw_strmatch_handler, &snprint_def_hw_strmatch);
|
|
|
1eb31d |
+ install_keyword("force_sync", &def_force_sync_handler, &snprint_def_force_sync);
|
|
|
1eb31d |
__deprecated install_keyword("default_selector", &def_selector_handler, NULL);
|
|
|
1eb31d |
__deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
|
|
|
1eb31d |
__deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL);
|
|
|
1eb31d |
Index: multipath-tools-130222/libmultipath/discovery.c
|
|
|
1eb31d |
===================================================================
|
|
|
1eb31d |
--- multipath-tools-130222.orig/libmultipath/discovery.c
|
|
|
1eb31d |
+++ multipath-tools-130222/libmultipath/discovery.c
|
|
|
1eb31d |
@@ -952,8 +952,12 @@ get_state (struct path * pp, int daemon)
|
|
|
1eb31d |
}
|
|
|
1eb31d |
}
|
|
|
1eb31d |
checker_clear_message(c);
|
|
|
1eb31d |
- if (daemon)
|
|
|
1eb31d |
- checker_set_async(c);
|
|
|
1eb31d |
+ if (daemon) {
|
|
|
1eb31d |
+ if (conf->force_sync == 0)
|
|
|
1eb31d |
+ checker_set_async(c);
|
|
|
1eb31d |
+ else
|
|
|
1eb31d |
+ checker_set_sync(c);
|
|
|
1eb31d |
+ }
|
|
|
1eb31d |
if (!conf->checker_timeout &&
|
|
|
1eb31d |
(pp->bus != SYSFS_BUS_SCSI ||
|
|
|
1eb31d |
sysfs_get_timeout(pp, &(c->timeout))))
|
|
|
1eb31d |
Index: multipath-tools-130222/multipath.conf.annotated
|
|
|
1eb31d |
===================================================================
|
|
|
1eb31d |
--- multipath-tools-130222.orig/multipath.conf.annotated
|
|
|
1eb31d |
+++ multipath-tools-130222/multipath.conf.annotated
|
|
|
1eb31d |
@@ -214,6 +214,8 @@
|
|
|
1eb31d |
# # values : n > 0
|
|
|
1eb31d |
# # default : determined by the OS
|
|
|
1eb31d |
# dev_loss_tmo 600
|
|
|
1eb31d |
+#
|
|
|
1eb31d |
+# #
|
|
|
1eb31d |
# # name : bindings_file
|
|
|
1eb31d |
# # scope : multipath
|
|
|
1eb31d |
# # desc : The location of the bindings file that is used with
|
|
|
1eb31d |
@@ -222,6 +224,14 @@
|
|
|
1eb31d |
# # default : "/var/lib/multipath/bindings"
|
|
|
1eb31d |
# bindings_file "/etc/multipath_bindings"
|
|
|
1eb31d |
#
|
|
|
1eb31d |
+# #
|
|
|
1eb31d |
+# # name : force_sync
|
|
|
1eb31d |
+# # scope : multipathd
|
|
|
1eb31d |
+# # desc : If set to yes, multipath will run all of the checkers in
|
|
|
1eb31d |
+# # sync mode, even if the checker has an async mode.
|
|
|
1eb31d |
+# # values : yes|no
|
|
|
1eb31d |
+# # default : no
|
|
|
1eb31d |
+# force_sync yes
|
|
|
1eb31d |
#}
|
|
|
1eb31d |
#
|
|
|
1eb31d |
##
|
|
|
1eb31d |
Index: multipath-tools-130222/multipath/multipath.conf.5
|
|
|
1eb31d |
===================================================================
|
|
|
1eb31d |
--- multipath-tools-130222.orig/multipath/multipath.conf.5
|
|
|
1eb31d |
+++ multipath-tools-130222/multipath/multipath.conf.5
|
|
|
1eb31d |
@@ -411,6 +411,15 @@ modify an existing config, or create a n
|
|
|
1eb31d |
, the user device configs will be regular expression matched against the
|
|
|
1eb31d |
built-in configs instead. Default is
|
|
|
1eb31d |
.I no
|
|
|
1eb31d |
+.TP
|
|
|
1eb31d |
+.B force_sync
|
|
|
1eb31d |
+If set to
|
|
|
1eb31d |
+.I yes
|
|
|
1eb31d |
+, multipathd will call the path checkers in sync mode only. This means that
|
|
|
1eb31d |
+only one checker will run at a time. This is useful in the case where many
|
|
|
1eb31d |
+multipathd checkers running in parallel causes significant CPU pressure. The
|
|
|
1eb31d |
+Default is
|
|
|
1eb31d |
+.I no
|
|
|
1eb31d |
.
|
|
|
1eb31d |
.SH "blacklist section"
|
|
|
1eb31d |
The
|