summaryrefslogtreecommitdiff
path: root/libmultipath/configure.c
diff options
context:
space:
mode:
authorChristophe Varoqui <cvaroqui@zezette.localdomain>2007-05-03 09:37:33 +0200
committerChristophe Varoqui <cvaroqui@zezette.localdomain>2007-05-03 09:37:33 +0200
commit0937dae15a93c3fe2d3429a54495aac4960816eb (patch)
tree4efd5ecfd730bae7d24b24d74095794631675719 /libmultipath/configure.c
parentc7f5829fc06e0054f419811eedf1b5a71461f7b0 (diff)
downloadmultipath-tools-0937dae15a93c3fe2d3429a54495aac4960816eb.tar.gz
multipath-tools-0937dae15a93c3fe2d3429a54495aac4960816eb.tar.bz2
multipath-tools-0937dae15a93c3fe2d3429a54495aac4960816eb.zip
[all] Path group timeout handling
The config file keyword is pg_timeout. Takes value in seconds. Default is none. Can be set in defaults, hardware or multipath configlets. From Redhat resync.
Diffstat (limited to 'libmultipath/configure.c')
-rw-r--r--libmultipath/configure.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index fba04a4..9632fb4 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -60,6 +60,7 @@ setup_map (struct multipath * mpp)
select_rr_weight(mpp);
select_minio(mpp);
select_no_path_retry(mpp);
+ select_pg_timeout(mpp);
/*
* assign paths to path groups -- start with no groups and all paths
@@ -174,8 +175,9 @@ select_action (struct multipath * mpp, vector curmp)
mpp->alias);
return;
}
- if (!mpp->no_path_retry && /* let features be handled by the daemon */
- strncmp(cmpp->features, mpp->features, strlen(mpp->features))) {
+ if (!mpp->no_path_retry && !mpp->pg_timeout &&
+ (strlen(cmpp->features) != strlen(mpp->features) ||
+ strcmp(cmpp->features, mpp->features))) {
mpp->action = ACT_RELOAD;
condlog(3, "%s: set ACT_RELOAD (features change)",
mpp->alias);
@@ -502,6 +504,12 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid)
else
dm_queue_if_no_path(mpp->alias, 1);
}
+ if (mpp->pg_timeout != PGTIMEOUT_UNDEF) {
+ if (mpp->pg_timeout == -PGTIMEOUT_NONE)
+ dm_set_pg_timeout(mpp->alias, 0);
+ else
+ dm_set_pg_timeout(mpp->alias, mpp->pg_timeout);
+ }
if (newmp) {
if (mpp->action != ACT_REJECT) {