Blame SOURCES/0231-RHBZ-1458852-delay-readying.patch

526b4e
---
526b4e
 libmultipath/config.c      |    4 +
526b4e
 libmultipath/config.h      |    3 +
526b4e
 libmultipath/defaults.h    |    1 
526b4e
 libmultipath/devmapper.c   |   19 ++++++--
526b4e
 libmultipath/dict.c        |  104 +++++++++++++++++++++++++++++++++++++++++++++
526b4e
 libmultipath/propsel.c     |   26 +++++++++++
526b4e
 libmultipath/propsel.h     |    1 
526b4e
 libmultipath/structs.h     |    7 +++
526b4e
 multipath/multipath.conf.5 |   13 +++++
526b4e
 multipath/multipath.rules  |    1 
526b4e
 multipathd/main.c          |   27 +++++++++++
526b4e
 11 files changed, 202 insertions(+), 4 deletions(-)
526b4e
526b4e
Index: multipath-tools-130222/libmultipath/config.c
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/libmultipath/config.c
526b4e
+++ multipath-tools-130222/libmultipath/config.c
526b4e
@@ -348,6 +348,7 @@ merge_hwe (struct hwentry * dst, struct
526b4e
 	merge_num(skip_kpartx);
526b4e
 	merge_num(max_sectors_kb);
526b4e
 	merge_num(unpriv_sgio);
526b4e
+	merge_num(ghost_delay);
526b4e
 
526b4e
 	/*
526b4e
 	 * Make sure features is consistent with
526b4e
@@ -412,6 +413,7 @@ overwrite_hwe (struct hwentry * dst, str
526b4e
 	overwrite_num(skip_kpartx);
526b4e
 	overwrite_num(max_sectors_kb);
526b4e
 	overwrite_num(unpriv_sgio);
526b4e
+	overwrite_num(ghost_delay);
526b4e
 
526b4e
 	/*
526b4e
 	 * Make sure features is consistent with
526b4e
@@ -482,6 +484,7 @@ store_hwe (vector hwtable, struct hwentr
526b4e
 	hwe->retain_hwhandler = dhwe->retain_hwhandler;
526b4e
 	hwe->detect_prio = dhwe->detect_prio;
526b4e
 	hwe->detect_checker = dhwe->detect_checker;
526b4e
+	hwe->ghost_delay = dhwe->ghost_delay;
526b4e
 
526b4e
 	if (dhwe->bl_product && !(hwe->bl_product = set_param_str(dhwe->bl_product)))
526b4e
 		goto out;
526b4e
@@ -694,6 +697,7 @@ load_config (char * file, struct udev *u
526b4e
 	conf->disable_changed_wwids = 0;
526b4e
 	conf->max_sectors_kb = DEFAULT_MAX_SECTORS_KB;
526b4e
 	conf->unpriv_sgio = DEFAULT_UNPRIV_SGIO;
526b4e
+	conf->ghost_delay = DEFAULT_GHOST_DELAY;
526b4e
 
526b4e
 	/*
526b4e
 	 * preload default hwtable
526b4e
Index: multipath-tools-130222/libmultipath/config.h
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/libmultipath/config.h
526b4e
+++ multipath-tools-130222/libmultipath/config.h
526b4e
@@ -70,6 +70,7 @@ struct hwentry {
526b4e
 	int skip_kpartx;
526b4e
 	int max_sectors_kb;
526b4e
 	int unpriv_sgio;
526b4e
+	int ghost_delay;
526b4e
 	char * bl_product;
526b4e
 };
526b4e
 
526b4e
@@ -100,6 +101,7 @@ struct mpentry {
526b4e
 	int skip_kpartx;
526b4e
 	int max_sectors_kb;
526b4e
 	int unpriv_sgio;
526b4e
+	int ghost_delay;
526b4e
 	uid_t uid;
526b4e
 	gid_t gid;
526b4e
 	mode_t mode;
526b4e
@@ -159,6 +161,7 @@ struct config {
526b4e
 	int disable_changed_wwids;
526b4e
 	int max_sectors_kb;
526b4e
 	int unpriv_sgio;
526b4e
+	int ghost_delay;
526b4e
 	unsigned int version[3];
526b4e
 
526b4e
 	char * dev;
526b4e
Index: multipath-tools-130222/libmultipath/defaults.h
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/libmultipath/defaults.h
526b4e
+++ multipath-tools-130222/libmultipath/defaults.h
526b4e
@@ -28,6 +28,7 @@
526b4e
 #define DEFAULT_SKIP_KPARTX SKIP_KPARTX_OFF
526b4e
 #define DEFAULT_MAX_SECTORS_KB	MAX_SECTORS_KB_UNDEF
526b4e
 #define DEFAULT_UNPRIV_SGIO UNPRIV_SGIO_OFF
526b4e
+#define DEFAULT_GHOST_DELAY GHOST_DELAY_OFF
526b4e
 
526b4e
 #define DEFAULT_CHECKINT	5
526b4e
 #define MAX_CHECKINT(a)		(a << 2)
526b4e
Index: multipath-tools-130222/libmultipath/devmapper.c
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/libmultipath/devmapper.c
526b4e
+++ multipath-tools-130222/libmultipath/devmapper.c
526b4e
@@ -23,6 +23,7 @@
526b4e
 #include "sysfs.h"
526b4e
 #include "discovery.h"
526b4e
 #include "log_pthread.h"
526b4e
+#include "propsel.h"
526b4e
 #include <sys/types.h>
526b4e
 #include <time.h>
526b4e
 
526b4e
@@ -334,7 +335,7 @@ static uint16_t build_udev_flags(const s
526b4e
 	/* DM_UDEV_DISABLE_LIBRARY_FALLBACK is added in dm_addmap */
526b4e
 	return  (mpp->skip_kpartx == SKIP_KPARTX_ON ?
526b4e
 		 MPATH_UDEV_NO_KPARTX_FLAG : 0) |
526b4e
-		(mpp->nr_active == 0 ?
526b4e
+		((mpp->nr_active == 0 || mpp->ghost_delay_tick > 0)?
526b4e
 		 MPATH_UDEV_NO_PATHS_FLAG : 0) |
526b4e
 		(reload && !mpp->force_udev_reload ?
526b4e
 		 MPATH_UDEV_RELOAD_FLAG : 0);
526b4e
@@ -343,8 +344,16 @@ static uint16_t build_udev_flags(const s
526b4e
 extern int
526b4e
 dm_addmap_create (struct multipath *mpp, char * params) {
526b4e
 	int ro;
526b4e
-	uint16_t udev_flags = build_udev_flags(mpp, 0);
526b4e
+	uint16_t udev_flags;
526b4e
 
526b4e
+	select_ghost_delay(mpp);
526b4e
+	if (conf->daemon && mpp->ghost_delay > 0 && mpp->nr_active &&
526b4e
+	    pathcount(mpp, PATH_GHOST) == mpp->nr_active)
526b4e
+		mpp->ghost_delay_tick = mpp->ghost_delay;
526b4e
+	else
526b4e
+		mpp->ghost_delay = 0;
526b4e
+
526b4e
+	udev_flags = build_udev_flags(mpp, 0);
526b4e
 	sysfs_set_max_sectors_kb(mpp, 0);
526b4e
 	for (ro = 0; ro <= 1; ro++) {
526b4e
 		int err;
526b4e
@@ -373,7 +382,11 @@ dm_addmap_create (struct multipath *mpp,
526b4e
 extern int
526b4e
 dm_addmap_reload (struct multipath *mpp, char *params, int flush) {
526b4e
 	int r = 0;
526b4e
-	uint16_t udev_flags = build_udev_flags(mpp, 1);
526b4e
+	uint16_t udev_flags;
526b4e
+
526b4e
+	if (mpp->ghost_delay_tick > 0 && pathcount(mpp, PATH_UP))
526b4e
+		mpp->ghost_delay_tick = mpp->ghost_delay = 0;
526b4e
+	udev_flags = build_udev_flags(mpp, 1);
526b4e
 
526b4e
 	sysfs_set_max_sectors_kb(mpp, 1);
526b4e
 	if (!mpp->force_readonly)
526b4e
Index: multipath-tools-130222/libmultipath/dict.c
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/libmultipath/dict.c
526b4e
+++ multipath-tools-130222/libmultipath/dict.c
526b4e
@@ -1032,6 +1032,25 @@ def_unpriv_sgio_handler(vector strvec)
526b4e
 	return 0;
526b4e
 }
526b4e
 
526b4e
+static int
526b4e
+def_ghost_delay_handler(vector strvec)
526b4e
+{
526b4e
+	char * buff;
526b4e
+
526b4e
+	buff = set_value(strvec);
526b4e
+	if (!buff)
526b4e
+		return 1;
526b4e
+
526b4e
+	if ((strlen(buff) == 2 && !strcmp(buff, "no")) ||
526b4e
+	    (strlen(buff) == 1 && !strcmp(buff, "0")))
526b4e
+		conf->ghost_delay = GHOST_DELAY_OFF;
526b4e
+	if ((conf->ghost_delay = atoi(buff)) < 0)
526b4e
+		conf->ghost_delay = DEFAULT_GHOST_DELAY;
526b4e
+
526b4e
+	FREE(buff);
526b4e
+	return 0;
526b4e
+}
526b4e
+
526b4e
 /*
526b4e
  * blacklist block handlers
526b4e
  */
526b4e
@@ -1895,6 +1914,29 @@ hw_unpriv_sgio_handler(vector strvec)
526b4e
 	return 0;
526b4e
 }
526b4e
 
526b4e
+static int
526b4e
+hw_ghost_delay_handler(vector strvec)
526b4e
+{
526b4e
+	struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable);
526b4e
+	char * buff;
526b4e
+
526b4e
+	if (!hwe)
526b4e
+		return 1;
526b4e
+
526b4e
+	buff = set_value(strvec);
526b4e
+	if (!buff)
526b4e
+		return 1;
526b4e
+
526b4e
+	if ((strlen(buff) == 2 && !strcmp(buff, "no")) ||
526b4e
+	    (strlen(buff) == 1 && !strcmp(buff, "0")))
526b4e
+		hwe->ghost_delay = GHOST_DELAY_OFF;
526b4e
+	if ((hwe->ghost_delay = atoi(buff)) < 0)
526b4e
+		hwe->ghost_delay = DEFAULT_GHOST_DELAY;
526b4e
+
526b4e
+	FREE(buff);
526b4e
+	return 0;
526b4e
+}
526b4e
+
526b4e
 /*
526b4e
  * multipaths block handlers
526b4e
  */
526b4e
@@ -2474,6 +2516,29 @@ mp_unpriv_sgio_handler(vector strvec)
526b4e
 	return 0;
526b4e
 }
526b4e
 
526b4e
+static int
526b4e
+mp_ghost_delay_handler(vector strvec)
526b4e
+{
526b4e
+	struct mpentry *mpe = VECTOR_LAST_SLOT(conf->mptable);
526b4e
+	char * buff;
526b4e
+
526b4e
+	if (!mpe)
526b4e
+		return 1;
526b4e
+
526b4e
+	buff = set_value(strvec);
526b4e
+	if (!buff)
526b4e
+		return 1;
526b4e
+
526b4e
+	if ((strlen(buff) == 2 && !strcmp(buff, "no")) ||
526b4e
+	    (strlen(buff) == 1 && !strcmp(buff, "0")))
526b4e
+		mpe->ghost_delay = GHOST_DELAY_OFF;
526b4e
+	if ((mpe->ghost_delay = atoi(buff)) < 0)
526b4e
+		mpe->ghost_delay = DEFAULT_GHOST_DELAY;
526b4e
+
526b4e
+	FREE(buff);
526b4e
+	return 0;
526b4e
+}
526b4e
+
526b4e
 /*
526b4e
  * config file keywords printing
526b4e
  */
526b4e
@@ -2788,6 +2853,19 @@ snprint_mp_unpriv_sgio (char * buff, int
526b4e
 }
526b4e
 
526b4e
 static int
526b4e
+snprint_mp_ghost_delay (char * buff, int len, void * data)
526b4e
+{
526b4e
+	struct mpentry * mpe = (struct mpentry *)data;
526b4e
+
526b4e
+	if (mpe->ghost_delay == GHOST_DELAY_UNDEF)
526b4e
+		return 0;
526b4e
+	else if (mpe->ghost_delay == GHOST_DELAY_OFF)
526b4e
+		return snprintf(buff, len, "no");
526b4e
+	else
526b4e
+		return snprintf(buff, len, "%d", mpe->ghost_delay);
526b4e
+}
526b4e
+
526b4e
+static int
526b4e
 snprint_hw_fast_io_fail(char * buff, int len, void * data)
526b4e
 {
526b4e
 	struct hwentry * hwe = (struct hwentry *)data;
526b4e
@@ -3202,6 +3280,19 @@ snprint_hw_unpriv_sgio(char * buff, int
526b4e
 }
526b4e
 
526b4e
 static int
526b4e
+snprint_hw_ghost_delay (char * buff, int len, void * data)
526b4e
+{
526b4e
+	struct hwentry * hwe = (struct hwentry *)data;
526b4e
+
526b4e
+	if (hwe->ghost_delay == GHOST_DELAY_UNDEF)
526b4e
+		return 0;
526b4e
+	else if (hwe->ghost_delay == GHOST_DELAY_OFF)
526b4e
+		return snprintf(buff, len, "no");
526b4e
+	else
526b4e
+		return snprintf(buff, len, "%d", hwe->ghost_delay);
526b4e
+}
526b4e
+
526b4e
+static int
526b4e
 snprint_def_polling_interval (char * buff, int len, void * data)
526b4e
 {
526b4e
 	return snprintf(buff, len, "%i", conf->checkint);
526b4e
@@ -3696,6 +3787,16 @@ snprint_def_unpriv_sgio(char * buff, int
526b4e
 }
526b4e
 
526b4e
 static int
526b4e
+snprint_def_ghost_delay (char * buff, int len, void * data)
526b4e
+{
526b4e
+	if (conf->ghost_delay == GHOST_DELAY_OFF ||
526b4e
+	    conf->ghost_delay == GHOST_DELAY_UNDEF)
526b4e
+		return snprintf(buff, len, "no");
526b4e
+	else
526b4e
+		return snprintf(buff, len, "%d", conf->ghost_delay);
526b4e
+}
526b4e
+
526b4e
+static int
526b4e
 snprint_ble_simple (char * buff, int len, void * data)
526b4e
 {
526b4e
 	struct blentry * ble = (struct blentry *)data;
526b4e
@@ -3792,6 +3893,7 @@ init_keywords(void)
526b4e
 	install_keyword("disable_changed_wwids", &def_disable_changed_wwids_handler, &snprint_def_disable_changed_wwids);
526b4e
 	install_keyword("max_sectors_kb", &def_max_sectors_kb_handler, &snprint_def_max_sectors_kb);
526b4e
 	install_keyword("unpriv_sgio", &def_unpriv_sgio_handler, &snprint_def_unpriv_sgio);
526b4e
+	install_keyword("ghost_delay", &def_ghost_delay_handler, &snprint_def_ghost_delay);
526b4e
 	__deprecated install_keyword("default_selector", &def_selector_handler, NULL);
526b4e
 	__deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
526b4e
 	__deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL);
526b4e
@@ -3863,6 +3965,7 @@ init_keywords(void)
526b4e
 	install_keyword("skip_kpartx", &hw_skip_kpartx_handler, &snprint_hw_skip_kpartx);
526b4e
 	install_keyword("max_sectors_kb", &hw_max_sectors_kb_handler, &snprint_hw_max_sectors_kb);
526b4e
 	install_keyword("unpriv_sgio", &hw_unpriv_sgio_handler, &snprint_hw_unpriv_sgio);
526b4e
+	install_keyword("ghost_delay", &hw_ghost_delay_handler, &snprint_hw_ghost_delay);
526b4e
 	install_sublevel_end();
526b4e
 
526b4e
 	install_keyword_root("overrides", &nop_handler);
526b4e
@@ -3923,5 +4026,6 @@ init_keywords(void)
526b4e
 	install_keyword("skip_kpartx", &mp_skip_kpartx_handler, &snprint_mp_skip_kpartx);
526b4e
 	install_keyword("max_sectors_kb", &mp_max_sectors_kb_handler, &snprint_mp_max_sectors_kb);
526b4e
 	install_keyword("unpriv_sgio", &mp_unpriv_sgio_handler, &snprint_mp_unpriv_sgio);
526b4e
+	install_keyword("ghost_delay", &mp_ghost_delay_handler, &snprint_mp_ghost_delay);
526b4e
 	install_sublevel_end();
526b4e
 }
526b4e
Index: multipath-tools-130222/libmultipath/propsel.c
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/libmultipath/propsel.c
526b4e
+++ multipath-tools-130222/libmultipath/propsel.c
526b4e
@@ -966,3 +966,29 @@ select_unpriv_sgio (struct multipath * m
526b4e
 	condlog(3, "unpriv_sgio = DISABLED (internal default)");
526b4e
 	return 0;
526b4e
 }
526b4e
+
526b4e
+extern int
526b4e
+select_ghost_delay (struct multipath * mp)
526b4e
+{
526b4e
+	if (mp->mpe && mp->mpe->ghost_delay != GHOST_DELAY_UNDEF) {
526b4e
+		mp->ghost_delay = mp->mpe->ghost_delay;
526b4e
+		condlog(3, "ghost_delay = %i (multipath setting)",
526b4e
+				mp->ghost_delay);
526b4e
+		return 0;
526b4e
+	}
526b4e
+	if (mp->hwe && mp->hwe->ghost_delay != GHOST_DELAY_UNDEF) {
526b4e
+		mp->ghost_delay = mp->hwe->ghost_delay;
526b4e
+		condlog(3, "ghost_delay = %i (controler setting)",
526b4e
+				mp->ghost_delay);
526b4e
+		return 0;
526b4e
+	}
526b4e
+	if (conf->ghost_delay != GHOST_DELAY_UNDEF) {
526b4e
+		mp->ghost_delay = conf->ghost_delay;
526b4e
+		condlog(3, "ghost_delay = %i (config file default)",
526b4e
+				mp->ghost_delay);
526b4e
+		return 0;
526b4e
+	}
526b4e
+	mp->ghost_delay = DEFAULT_GHOST_DELAY;
526b4e
+	condlog(3, "ghost_delay = DISABLED (internal default)");
526b4e
+	return 0;
526b4e
+}
526b4e
Index: multipath-tools-130222/libmultipath/propsel.h
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/libmultipath/propsel.h
526b4e
+++ multipath-tools-130222/libmultipath/propsel.h
526b4e
@@ -27,3 +27,4 @@ int select_delay_wait_checks (struct mul
526b4e
 int select_skip_kpartx (struct multipath * mp);
526b4e
 int select_max_sectors_kb (struct multipath * mp);
526b4e
 int select_unpriv_sgio (struct multipath * mp);
526b4e
+int select_ghost_delay (struct multipath * mp);
526b4e
Index: multipath-tools-130222/libmultipath/structs.h
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/libmultipath/structs.h
526b4e
+++ multipath-tools-130222/libmultipath/structs.h
526b4e
@@ -176,6 +176,11 @@ enum prkey_sources {
526b4e
 	PRKEY_SOURCE_FILE,
526b4e
 };
526b4e
 
526b4e
+enum ghost_delay_states {
526b4e
+	GHOST_DELAY_OFF = -1,
526b4e
+	GHOST_DELAY_UNDEF = 0,
526b4e
+};
526b4e
+
526b4e
 struct sg_id {
526b4e
 	int host_no;
526b4e
 	int channel;
526b4e
@@ -273,6 +278,8 @@ struct multipath {
526b4e
 	int max_sectors_kb;
526b4e
 	int force_readonly;
526b4e
 	int unpriv_sgio;
526b4e
+	int ghost_delay;
526b4e
+	int ghost_delay_tick;
526b4e
 	unsigned int dev_loss;
526b4e
 	uid_t uid;
526b4e
 	gid_t gid;
526b4e
Index: multipath-tools-130222/multipathd/main.c
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/multipathd/main.c
526b4e
+++ multipath-tools-130222/multipathd/main.c
526b4e
@@ -195,6 +195,8 @@ sync_map_state(struct multipath *mpp)
526b4e
 			    pp->state == PATH_WILD ||
526b4e
 			    pp->state == PATH_DELAYED)
526b4e
 				continue;
526b4e
+			if (mpp->ghost_delay_tick > 0)
526b4e
+				continue;
526b4e
 			if ((pp->dmstate == PSTATE_FAILED ||
526b4e
 			     pp->dmstate == PSTATE_UNDEF) &&
526b4e
 			    (pp->state == PATH_UP || pp->state == PATH_GHOST))
526b4e
@@ -535,7 +537,7 @@ ev_add_path (struct path * pp, struct ve
526b4e
 	if (mpp && mpp->wait_for_udev) {
526b4e
 		if (pathcount(mpp, PATH_UP) == 0 &&
526b4e
 		    (pathcount(mpp, PATH_GHOST) == 0 ||
526b4e
-		     pp->tpgs == TPGS_IMPLICIT))
526b4e
+		     mpp->ghost_delay_tick > 0 || pp->tpgs == TPGS_IMPLICIT))
526b4e
 			mpp->force_udev_reload = 1;
526b4e
 		else {
526b4e
 			condlog(2, "%s [%s]: delaying path addition until %s is fully initialized", pp->dev, pp->dev_t, mpp->alias);
526b4e
@@ -1215,6 +1217,28 @@ missing_uev_wait_tick(struct vectors *ve
526b4e
 }
526b4e
 
526b4e
 static void
526b4e
+ghost_delay_tick(struct vectors *vecs)
526b4e
+{
526b4e
+	struct multipath * mpp;
526b4e
+	unsigned int i;
526b4e
+
526b4e
+	vector_foreach_slot (vecs->mpvec, mpp, i) {
526b4e
+		if (mpp->ghost_delay_tick <= 0)
526b4e
+			continue;
526b4e
+		if (--mpp->ghost_delay_tick <= 0) {
526b4e
+			condlog(0, "%s: timed out waiting for active path",
526b4e
+				mpp->alias);
526b4e
+			if (update_map(mpp, vecs) != 0) {
526b4e
+				/* update_map removed map */
526b4e
+				i--;
526b4e
+				continue;
526b4e
+			}
526b4e
+			mpp->ghost_delay = mpp->ghost_delay_tick = 0;
526b4e
+		}
526b4e
+	}
526b4e
+}
526b4e
+
526b4e
+static void
526b4e
 defered_failback_tick (vector mpvec)
526b4e
 {
526b4e
 	struct multipath * mpp;
526b4e
@@ -1560,6 +1584,7 @@ checkerloop (void *ap)
526b4e
 			defered_failback_tick(vecs->mpvec);
526b4e
 			retry_count_tick(vecs->mpvec);
526b4e
 			missing_uev_wait_tick(vecs);
526b4e
+			ghost_delay_tick(vecs);
526b4e
 		}
526b4e
 		if (count)
526b4e
 			count--;
526b4e
Index: multipath-tools-130222/multipath/multipath.rules
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/multipath/multipath.rules
526b4e
+++ multipath-tools-130222/multipath/multipath.rules
526b4e
@@ -55,6 +55,7 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG1}=="1", GOTO=
526b4e
 ENV{DM_ACTIVATION}=="1", ENV{DM_MULTIPATH_NEED_KPARTX}="1"
526b4e
 ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
526b4e
 ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
526b4e
+ENV{DM_NOSCAN}=="1", GOTO="end_mpath"
526b4e
 ENV{DM_ACTIVATION}!="1", ENV{DM_MULTIPATH_NEED_KPARTX}!="1", GOTO="end_mpath"
526b4e
 RUN+="$env{MPATH_SBIN_PATH}/kpartx -an $tempnode", \
526b4e
 	ENV{DM_MULTIPATH_NEED_KPARTX}=""
526b4e
Index: multipath-tools-130222/multipath/multipath.conf.5
526b4e
===================================================================
526b4e
--- multipath-tools-130222.orig/multipath/multipath.conf.5
526b4e
+++ multipath-tools-130222/multipath/multipath.conf.5
526b4e
@@ -601,6 +601,15 @@ device to the specified value. Default i
526b4e
 If set to \fIyes\fR, multipath will set upriv_sgio on the multipath device and
526b4e
 all its paths, when it is created or reloaded. The default is
526b4e
 .I no
526b4e
+.TP
526b4e
+.B ghost_delay
526b4e
+Sets the number of seconds that multipath will wait after creating a device
526b4e
+with only ghost paths before marking it ready for use in systemd. This gives
526b4e
+the active paths time to appear before the multipath runs the hardware handler
526b4e
+to switch the ghost paths to active ones. Setting this to \fI0\fR or \fIoff\fR
526b4e
+makes multipath immediately mark a device with only ghost paths as ready. The
526b4e
+default is
526b4e
+.I off
526b4e
 .
526b4e
 .SH "blacklist section"
526b4e
 The
526b4e
@@ -716,6 +725,8 @@ section:
526b4e
 .B max_sectors_kb
526b4e
 .TP
526b4e
 .B unpriv_sgio
526b4e
+.TP
526b4e
+.B ghost_delay
526b4e
 .RE
526b4e
 .PD
526b4e
 .LP
526b4e
@@ -820,6 +831,8 @@ section:
526b4e
 .B max_sectors_kb
526b4e
 .TP
526b4e
 .B unpriv_sgio
526b4e
+.TP
526b4e
+.B ghost_delay
526b4e
 .RE
526b4e
 .PD
526b4e
 .LP