device-mapper-multipath/0089-RHBZ-1110016-add-noasync-option.patch

159 lines
5.1 KiB
Diff
Raw Normal View History

device-mapper-multipath-0.4.9-68 Modify multipath.conf * remove getuid_callout example Re-add 0050-RH-listing-speedup.patch Add 0081-RHBZ-1066264-check-prefix-on-rename.patch * make multipath check the prefix on kpartx partitions during rename, and copy the existing behaviour Add 0082-UPBZ-1109995-no-sync-turs-on-pthread_cancel.patch * If async tur checker fails on threads, don't retry with the sync version Add 0083-RHBZ-1080055-orphan-paths-on-reload.patch * Fix case where pathlist wasn't getting updated properly Add 0084-RHBZ-1110000-multipath-man.patch * fix errors in multipath man page Add 0085-UPBZ-1110006-datacore-config.patch * Add support for DataCore Virtual Disk Add 0086-RHBZ-1110007-orphan-path-on-failed-add.patch * If multipathd fails to add path correctly, it now fully orphans the path Add 0087-RHBZ-1110013-config-error-checking.patch * Improve multipath.conf error checking. Add 0088-RHBZ-1069811-configurable-prio-timeout.patch * checker_timeout now adjusts the timeouts of the prioritizers as well. Add 0089-RHBZ-1110016-add-noasync-option.patch * Add a new defaults option, "force_sync", that disables the async mode of the path checkers. This is for cases where to many parallel checkers hog the cpu Add 0090-UPBZ-1080038-reorder-paths-for-round-robin.patch * make multipathd order paths for better throughput in round-robin mode Add 0091-RHBZ-1069584-fix-empty-values-fast-io-fail-and-dev-loss.patch * check for null pointers in configuration reading code. Add 0092-UPBZ-1104605-reload-on-rename.patch * Reload table on rename if necessary Add 0093-UPBZ-1086825-user-friendly-name-remap.patch * Keep existing user_friend_name if possible Add 0094-RHBZ-1086825-cleanup-remap.patch * Cleanup issues with upstream patch Add 0095-RHBZ-1127944-xtremIO-config.patch * Add support for EMC ExtremIO devices Add 0096-RHBZ-979474-new-wildcards.patch * Add N, n, R, and r path wildcards to print World Wide ids Add 0097-RH-fix-coverity-errors.patch * Fix a number of unterminated strings and memory leaks on failure paths. Add 0098-UPBZ-1067171-mutipath-i.patch * Add -i option to ignore wwids file when checking for valid paths Add 0099-RH-add-all-devs.patch * Add new devices config option all_devs. This makes the configuration overwrite the specified values in all builtin configs Add 0100-RHBZ-1067171-multipath-i-update.patch * make -i work correctly with find_multipaths Add 0101-RH-adapter-name-wildcard.patch * Add 'a' path wildcard to print adapter name
2014-09-16 23:22:40 +00:00
---
libmultipath/config.c | 1 +
libmultipath/config.h | 1 +
libmultipath/dict.c | 33 +++++++++++++++++++++++++++++++++
libmultipath/discovery.c | 8 ++++++--
multipath.conf.annotated | 10 ++++++++++
multipath/multipath.conf.5 | 9 +++++++++
6 files changed, 60 insertions(+), 2 deletions(-)
Index: multipath-tools-130222/libmultipath/config.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/config.c
+++ multipath-tools-130222/libmultipath/config.c
@@ -556,6 +556,7 @@ load_config (char * file, struct udev *u
conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER;
conf->detect_prio = DEFAULT_DETECT_PRIO;
conf->hw_strmatch = 0;
+ conf->force_sync = 0;
/*
* preload default hwtable
Index: multipath-tools-130222/libmultipath/config.h
===================================================================
--- multipath-tools-130222.orig/libmultipath/config.h
+++ multipath-tools-130222/libmultipath/config.h
@@ -115,6 +115,7 @@ struct config {
int reassign_maps;
int retain_hwhandler;
int detect_prio;
+ int force_sync;
unsigned int version[3];
char * dev;
Index: multipath-tools-130222/libmultipath/dict.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/dict.c
+++ multipath-tools-130222/libmultipath/dict.c
@@ -712,6 +712,29 @@ def_hw_strmatch_handler(vector strvec)
return 0;
}
+static int
+def_force_sync_handler(vector strvec)
+{
+ char * buff;
+
+ buff = set_value(strvec);
+
+ if (!buff)
+ return 1;
+
+ if ((strlen(buff) == 2 && !strcmp(buff, "no")) ||
+ (strlen(buff) == 1 && !strcmp(buff, "0")))
+ conf->force_sync = 0;
+ else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) ||
+ (strlen(buff) == 1 && !strcmp(buff, "1")))
+ conf->force_sync = 1;
+ else
+ conf->force_sync = 0;
+
+ FREE(buff);
+ return 0;
+}
+
/*
* blacklist block handlers
*/
@@ -2822,6 +2845,15 @@ snprint_def_hw_strmatch(char * buff, int
}
static int
+snprint_def_force_sync(char * buff, int len, void * data)
+{
+ if (conf->force_sync)
+ return snprintf(buff, len, "yes");
+ else
+ return snprintf(buff, len, "no");
+}
+
+static int
snprint_ble_simple (char * buff, int len, void * data)
{
struct blentry * ble = (struct blentry *)data;
@@ -2889,6 +2921,7 @@ init_keywords(void)
install_keyword("retain_attached_hw_handler", &def_retain_hwhandler_handler, &snprint_def_retain_hwhandler_handler);
install_keyword("detect_prio", &def_detect_prio_handler, &snprint_def_detect_prio);
install_keyword("hw_str_match", &def_hw_strmatch_handler, &snprint_def_hw_strmatch);
+ install_keyword("force_sync", &def_force_sync_handler, &snprint_def_force_sync);
__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);
Index: multipath-tools-130222/libmultipath/discovery.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/discovery.c
+++ multipath-tools-130222/libmultipath/discovery.c
@@ -952,8 +952,12 @@ get_state (struct path * pp, int daemon)
}
}
checker_clear_message(c);
- if (daemon)
- checker_set_async(c);
+ if (daemon) {
+ if (conf->force_sync == 0)
+ checker_set_async(c);
+ else
+ checker_set_sync(c);
+ }
if (!conf->checker_timeout &&
(pp->bus != SYSFS_BUS_SCSI ||
sysfs_get_timeout(pp, &(c->timeout))))
Index: multipath-tools-130222/multipath.conf.annotated
===================================================================
--- multipath-tools-130222.orig/multipath.conf.annotated
+++ multipath-tools-130222/multipath.conf.annotated
@@ -214,6 +214,8 @@
# # values : n > 0
# # default : determined by the OS
# dev_loss_tmo 600
+#
+# #
# # name : bindings_file
# # scope : multipath
# # desc : The location of the bindings file that is used with
@@ -222,6 +224,14 @@
# # default : "/var/lib/multipath/bindings"
# bindings_file "/etc/multipath_bindings"
#
+# #
+# # name : force_sync
+# # scope : multipathd
+# # desc : If set to yes, multipath will run all of the checkers in
+# # sync mode, even if the checker has an async mode.
+# # values : yes|no
+# # default : no
+# force_sync yes
#}
#
##
Index: multipath-tools-130222/multipath/multipath.conf.5
===================================================================
--- multipath-tools-130222.orig/multipath/multipath.conf.5
+++ multipath-tools-130222/multipath/multipath.conf.5
@@ -411,6 +411,15 @@ modify an existing config, or create a n
, the user device configs will be regular expression matched against the
built-in configs instead. Default is
.I no
+.TP
+.B force_sync
+If set to
+.I yes
+, multipathd will call the path checkers in sync mode only. This means that
+only one checker will run at a time. This is useful in the case where many
+multipathd checkers running in parallel causes significant CPU pressure. The
+Default is
+.I no
.
.SH "blacklist section"
The