[device-mapper-multipath] Updated to latest upstream 0.4.9 code : multipath-tools-120123.tgz (git commit id: 63704387009443b

Benjamin Marzinski bmarzins at fedoraproject.org
Tue Jan 24 22:30:19 UTC 2012


commit a1478bc1bcf95fdd3feae2e0405b135ff4cc7954
Author: Benjamin Marzinski <bmarzins at redhat.com>
Date:   Tue Jan 24 10:35:54 2012 -0600

    Updated to latest upstream 0.4.9 code : multipath-tools-120123.tgz
      (git commit id: 63704387009443bdb37d9deaaafa9ab121d45bfb)
    Add 0001-RH-fix-async-tur.patch
    Add 0002-RH-dont_start_with_no_config.patch
    Add 0003-RH-multipath.rules.patch
    Add 0004-RH-update-init-script.patch
    Add 0005-RH-cciss_id.patch
    Add 0006-RH-Make-build-system-RH-Fedora-friendly.patch
    Add 0007-RH-multipathd-blacklist-all-by-default.patch
    Add 0008-RH-add-mpathconf.patch
    Add 0009-RH-add-find-multipaths.patch
    Add 0010-RH-check-if-multipath-owns-path.patch
    Add 0011-RH-add-hp_tur-checker.patch

 .gitignore                                         |    1 +
 0001-RH-fix-async-tur.patch                        |  242 ++++++++
 0001-RH-queue-without-daemon.patch                 |  165 ------
 0001-for-upstream-add-tpg_pref-prioritizer.patch   |  123 ----
 0002-RH-dont_start_with_no_config.patch            |   16 +
 0002-RH-path-checker.patch                         |  198 -------
 0002-for-upstream-add-tmo-config-options.patch     |  511 ----------------
 ...-changes.patch => 0003-RH-multipath.rules.patch |   49 +-
 0003-RH-root-init-script.patch                     |   84 ---
 0003-for-upstream-default-configs.patch            |   56 --
 0004-RH-fix-kpartx.patch                           |   48 --
 0004-RH-update-init-script.patch                   |   76 +++
 ...6-RH-Make-build-system-RH-Fedora-friendly.patch |   58 ++-
 0006-RH-move-bindings.patch                        |   56 --
 0007-RH-do-not-remove.patch                        |   39 --
 ...07-RH-multipathd-blacklist-all-by-default.patch |   58 +-
 0008-RH-add-mpathconf.patch                        |  546 +++++++++++++++++
 ...aths.patch => 0009-RH-add-find-multipaths.patch |  567 ++++---------------
 0010-RH-check-if-multipath-owns-path.patch         |  119 ++++
 ...ecker.patch => 0011-RH-add-hp_tur-checker.patch |  143 +++--
 0011-RH-fix-init-script-LSB-headers.patch          |   29 -
 0012-RH-udev-sync-support.patch                    |  378 ------------
 0013-RH-add-weighted_prio-prioritizer.patch        |  546 -----------------
 0015-RH-add-multipathd-count-paths-cmd.patch       |  150 -----
 0016-RHBZ-554561-fix-init-error-msg.patch          |   23 -
 0017-RHBZ-554592-man-page-note.patch               |   17 -
 0018-RHBZ-554596-SUN-6540-config.patch             |   57 --
 0019-RHBZ-554598-fix-multipath-locking.patch       |   43 --
 0020-RHBZ-554605-fix-manual-failover.patch         |   52 --
 0022-RHBZ-557845-RHEL5-style-partitions.patch      |  327 -----------
 0023-RHBZ-557810-emc-invista-config.patch          |   52 --
 0024-RHBZ-565933-checker-timeout.patch             |  428 --------------
 0025-RHBZ-508827-update-multipathd-manpage.patch   |   68 ---
 0026-RHBZ-549636-default-path-selector.patch       |   98 ---
 0027-RHBZ-509443-enhance-show-config.patch         |  442 --------------
 0028-RHBZ-452617-add-revision-parameter.patch      |   57 --
 ...HBZ-567219-recalculate-pgs-in-checkerloop.patch |   68 ---
 ...-RHBZ-558636-check-if-multipath-owns-path.patch |  146 -----
 0031-RHBZ-570546-display-avg-pg-prio.patch         |   23 -
 0032-RHBZ-575767-ontap_prio.patch                  |  617 --------------------
 0033-RHBZ-573715-eurologic-config.patch            |   53 --
 0034-RHBZ-579575-add-q-multipath-option.patch      |  135 -----
 0035-RHBZ-467709-add-followover.patch              |  141 -----
 0036-RH-clear-messages.patch                       |   46 --
 0037-RH-adopt-paths.patch                          |   31 -
 0038-RHBZ-587201-IBM-SGI.patch                     |   61 --
 0039-RHBZ-589153-manpage-update.patch              |  251 --------
 0040-RHBZ-587695-add-checker-msg-alias.patch       |   17 -
 0041-RHBZ-587695-add-rdac-message.patch            |   54 --
 0042-RHBZ-590038-fix-fast-io-fail-tmo.patch        |   17 -
 0043-RHBZ-590028-close-sysfs_attr_fd.patch         |   16 -
 0044-RHBZ-591940-dont-clear-daemon.patch           |   16 -
 0045-RHBZ-593379-dont-add-unknown-paths.patch      |   25 -
 0046-RHBZ-593426-move-adopt-path.patch             |   24 -
 0047-RHBZ-591608-only-switch-pgs-once.patch        |   52 --
 0048-RHBZ-592494-fix-user-configs.patch            |  114 ----
 0049-RHBZ-591644-enhance-mpathconf.patch           |  228 --------
 0050-RHBZ-595400-fix-checker-tmo.patch             |   17 -
 0051-RHBZ-596156-mpathconf-man-page.patch          |  154 -----
 0052-RHBZ-601247-fix-path-adoption.patch           |  115 ----
 0053-RHBZ-596323-remember_more_wwids.patch         |   16 -
 0054-RHBZ-596319-rules-cleanup.patch               |   41 --
 0055-RHBZ-602257-update-on-show-topology.patch     |  142 -----
 0056-RHBZ-603812-better-type-check.patch           |   91 ---
 0057-RHBZ-607869-fix-resize.patch                  |   35 --
 0058-RHBZ-601665-assemble-features.patch           |   66 ---
 0059-RHBZ-607874-handle-offlined-paths.patch       |   68 ---
 0060-RHBZ-606420-fix-remove-map.patch              |   16 -
 0061-RHBZ-620479-find-rport.patch                  |   77 ---
 0062-RHBZ-592998-hpsc-config.patch                 |   17 -
 0063-RHBZ-595719-udev_link_priority.patch          |   19 -
 0064-RHBZ-612173-fix-reverse-lookup.patch          |   13 -
 0065-RHBZ-635088-update-priority.patch             |   79 ---
 0066-RHBZ-636071-mpathconf-variable_names.patch    |   35 --
 0067-RHBZ-622569-symmetrix-config.patch            |   36 --
 0068-RHBZ-632734-nvdisk-config.patch               |   89 ---
 0069-RHBZ-636246-hp-open-config.patch              |   74 ---
 0070-RHBZ-639037-hitachi-open-config.patch         |   30 -
 0071-RHBZ-611779-fix-whitespace-crash.patch        |   20 -
 0072-RHBZ-651389-change-scsi-tmo-order.patch       |   34 --
 0073-RHBZ-650664-clarify-error-msg.patch           |  157 -----
 0074-RHBZ-602883-dont-print-change.patch           |   31 -
 0075-RHBZ-576919-log-checker-err.patch             |  139 -----
 0076-RHBZ-599690-update-multipath-conf.patch       |   18 -
 0077-RHBZ-622608-nvdisk-config.patch               |   49 --
 0078-RHBZ-628095-config-warnings.patch             |  248 --------
 0079-RHBZ-650797-display-iscsi-tgt-name.patch      |   55 --
 ...-RHBZ-662731-fix-no-config-value-segfault.patch |   31 -
 0081-RHBZ-623644-fix-sysfs-caching.patch           |  376 ------------
 0083-RHBZ-636213-633643-new-configs.patch          |   99 ----
 0084-RHBZ-644111-read-only-bindings.patch          |  160 -----
 0085-RHBZ-645605-fix-offline-check.patch           |   17 -
 0086-RHBZ-681144-sysfs-device-cleanup.patch        |   92 ---
 0087-RHBZ-680480-skip-if-no-sysdev.patch           |   19 -
 0088-RHBZ-693524-fix-prio-segfault.patch           |   29 -
 0089-RHBZ-694602-RSSM-config.patch                 |   58 --
 0090-RHBZ-700169-fix-nr-active.patch               |   17 -
 0091-RHBZ-699577-manpage-clarification.patch       |   51 --
 0092-RHBZ-689504-rdac-retry.patch                  |   64 --
 0093-RHBZ-677449-dont-remove-map-on-enomem.patch   |   18 -
 0094-RHBZ-707560-check-return-value.patch          |   18 -
 0095-RHBZ-678673-no-path-groups.patch              |   30 -
 0096-RHBZ-683616-ioship-support.patch              |  151 -----
 0097-RHBZ-697386-fix-shutdown-crash.patch          |   17 -
 0098-RHBZ-706555-dont-update-pgs-in-manual.patch   |   18 -
 0099-RHBZ-705854-warn-on-bad-dev-loss-tmo.patch    |   17 -
 0100-RHBZ-710478-deprecate-uid-gid-mode.patch      |  162 -----
 ...-631009-disable-udev-disk-rules-on-reload.patch |  173 ------
 0102-RHBZ-690828-systemd-unit-file.patch           |   58 --
 0103-add-disable-sync-option.patch                 |   35 --
 0104-RHBZ-737989-systemd-unit-fix.patch            |   23 -
 0105-fix-oom-adj.patch                             |   69 ---
 device-mapper-multipath.spec                       |  260 ++-------
 sources                                            |    2 +-
 114 files changed, 1334 insertions(+), 10768 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e2477ff..b1123c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 multipath-tools-091027.tar.gz
+/multipath-tools-120123.tgz
diff --git a/0001-RH-fix-async-tur.patch b/0001-RH-fix-async-tur.patch
new file mode 100644
index 0000000..fd51535
--- /dev/null
+++ b/0001-RH-fix-async-tur.patch
@@ -0,0 +1,242 @@
+---
+ libmultipath/checkers/tur.c |   85 +++++++++++++++++++++++++++++++++-----------
+ libmultipath/discovery.c    |    1 
+ 2 files changed, 65 insertions(+), 21 deletions(-)
+
+Index: multipath-tools-120123/libmultipath/checkers/tur.c
+===================================================================
+--- multipath-tools-120123.orig/libmultipath/checkers/tur.c
++++ multipath-tools-120123/libmultipath/checkers/tur.c
+@@ -35,10 +35,15 @@ struct tur_checker_context {
+ 	dev_t devt;
+ 	int state;
+ 	int running;
+-	time_t timeout;
++	int fd;
++	unsigned int timeout;
++	time_t time;
+ 	pthread_t thread;
+ 	pthread_mutex_t lock;
+ 	pthread_cond_t active;
++	pthread_spinlock_t hldr_lock;
++	int holders;
++	char message[CHECKER_MSG_LEN];
+ };
+ 
+ #define TUR_DEVT(c) major((c)->devt), minor((c)->devt)
+@@ -53,28 +58,49 @@ int libcheck_init (struct checker * c)
+ 	memset(ct, 0, sizeof(struct tur_checker_context));
+ 
+ 	ct->state = PATH_UNCHECKED;
++	ct->fd = -1;
++	ct->holders = 1;
+ 	pthread_cond_init(&ct->active, NULL);
+ 	pthread_mutex_init(&ct->lock, NULL);
++	pthread_spin_init(&ct->hldr_lock, PTHREAD_PROCESS_PRIVATE);
+ 	c->context = ct;
+ 
+ 	return 0;
+ }
+ 
++void cleanup_context(struct tur_checker_context *ct)
++{
++	pthread_mutex_destroy(&ct->lock);
++	pthread_cond_destroy(&ct->active);
++	pthread_spin_destroy(&ct->hldr_lock);
++	free(ct);
++}
++
+ void libcheck_free (struct checker * c)
+ {
+ 	if (c->context) {
+ 		struct tur_checker_context *ct = c->context;
++		int holders;
++		pthread_t thread;
+ 
+-		pthread_mutex_destroy(&ct->lock);
+-		pthread_cond_destroy(&ct->active);
+-		free(c->context);
++		pthread_spin_lock(&ct->hldr_lock);
++		ct->holders--;
++		holders = ct->holders;
++		thread = ct->thread;
++		pthread_spin_unlock(&ct->hldr_lock);
++		if (holders)
++			pthread_cancel(thread);
++		else
++			cleanup_context(ct);
+ 		c->context = NULL;
+ 	}
+ 	return;
+ }
+ 
++#define TUR_MSG(msg, fmt, args...) snprintf(msg, CHECKER_MSG_LEN, fmt, ##args);
++
+ int
+-tur_check (struct checker * c)
++tur_check(int fd, unsigned int timeout, char *msg)
+ {
+ 	struct sg_io_hdr io_hdr;
+ 	unsigned char turCmdBlk[TUR_CMD_LEN] = { 0x00, 0, 0, 0, 0, 0 };
+@@ -90,10 +116,10 @@ tur_check (struct checker * c)
+ 	io_hdr.dxfer_direction = SG_DXFER_NONE;
+ 	io_hdr.cmdp = turCmdBlk;
+ 	io_hdr.sbp = sense_buffer;
+-	io_hdr.timeout = c->timeout;
++	io_hdr.timeout = timeout;
+ 	io_hdr.pack_id = 0;
+-	if (ioctl(c->fd, SG_IO, &io_hdr) < 0) {
+-		MSG(c, MSG_TUR_DOWN);
++	if (ioctl(fd, SG_IO, &io_hdr) < 0) {
++		TUR_MSG(msg, MSG_TUR_DOWN);
+ 		return PATH_DOWN;
+ 	}
+ 	if ((io_hdr.status & 0x7e) == 0x18) {
+@@ -101,7 +127,7 @@ tur_check (struct checker * c)
+ 		 * SCSI-3 arrays might return
+ 		 * reservation conflict on TUR
+ 		 */
+-		MSG(c, MSG_TUR_UP);
++		TUR_MSG(msg, MSG_TUR_UP);
+ 		return PATH_UP;
+ 	}
+ 	if (io_hdr.info & SG_INFO_OK_MASK) {
+@@ -146,14 +172,14 @@ tur_check (struct checker * c)
+ 				 * LOGICAL UNIT NOT ACCESSIBLE,
+ 				 * TARGET PORT IN STANDBY STATE
+ 				 */
+-				MSG(c, MSG_TUR_GHOST);
++				TUR_MSG(msg, MSG_TUR_GHOST);
+ 				return PATH_GHOST;
+ 			}
+ 		}
+-		MSG(c, MSG_TUR_DOWN);
++		TUR_MSG(msg, MSG_TUR_DOWN);
+ 		return PATH_DOWN;
+ 	}
+-	MSG(c, MSG_TUR_UP);
++	TUR_MSG(msg, MSG_TUR_UP);
+ 	return PATH_UP;
+ }
+ 
+@@ -162,18 +188,25 @@ tur_check (struct checker * c)
+ 
+ void cleanup_func(void *data)
+ {
++	int holders;
+ 	struct tur_checker_context *ct = data;
++	pthread_spin_lock(&ct->hldr_lock);
++	ct->holders--;
++	holders = ct->holders;
+ 	ct->thread = 0;
++	pthread_spin_unlock(&ct->hldr_lock);
++	if (!holders)
++		cleanup_context(ct);
+ }
+ 
+ void *tur_thread(void *ctx)
+ {
+-	struct checker *c = ctx;
+-	struct tur_checker_context *ct = c->context;
++	struct tur_checker_context *ct = ctx;
+ 	int state;
+ 
+ 	condlog(3, "%d:%d: tur checker starting up", TUR_DEVT(ct));
+ 
++	ct->message[0] = '\0';
+ 	/* This thread can be canceled, so setup clean up */
+ 	tur_thread_cleanup_push(ct)
+ 
+@@ -182,7 +215,7 @@ void *tur_thread(void *ctx)
+ 	ct->state = PATH_PENDING;
+ 	pthread_mutex_unlock(&ct->lock);
+ 
+-	state = tur_check(c);
++	state = tur_check(ct->fd, ct->timeout, ct->message);
+ 
+ 	/* TUR checker done */
+ 	pthread_mutex_lock(&ct->lock);
+@@ -213,7 +246,7 @@ void tur_set_async_timeout(struct checke
+ 	struct timeval now;
+ 
+ 	gettimeofday(&now, NULL);
+-	ct->timeout = now.tv_sec + c->timeout;
++	ct->time = now.tv_sec + c->timeout;
+ }
+ 
+ int tur_check_async_timeout(struct checker *c)
+@@ -222,7 +255,7 @@ int tur_check_async_timeout(struct check
+ 	struct timeval now;
+ 
+ 	gettimeofday(&now, NULL);
+-	return (now.tv_sec > ct->timeout);
++	return (now.tv_sec > ct->time);
+ }
+ 
+ extern int
+@@ -242,7 +275,7 @@ libcheck_check (struct checker * c)
+ 		ct->devt = sb.st_rdev;
+ 
+ 	if (c->sync)
+-		return tur_check(c);
++		return tur_check(c->fd, c->timeout, c->message);
+ 
+ 	/*
+ 	 * Async mode
+@@ -276,6 +309,8 @@ libcheck_check (struct checker * c)
+ 			/* TUR checker done */
+ 			ct->running = 0;
+ 			tur_status = ct->state;
++			strncpy(c->message, ct->message, CHECKER_MSG_LEN);
++			c->message[CHECKER_MSG_LEN - 1] = '\0';
+ 		}
+ 		pthread_mutex_unlock(&ct->lock);
+ 	} else {
+@@ -284,24 +319,32 @@ libcheck_check (struct checker * c)
+ 			pthread_mutex_unlock(&ct->lock);
+ 			condlog(3, "%d:%d: tur thread not responding, "
+ 				"using sync mode", TUR_DEVT(ct));
+-			return tur_check(c);
++			return tur_check(c->fd, c->timeout, c->message);
+ 		}
+ 		/* Start new TUR checker */
+ 		ct->state = PATH_UNCHECKED;
++		ct->fd = c->fd;
++		ct->timeout = c->timeout;
++		pthread_spin_lock(&ct->hldr_lock);
++		ct->holders++;
++		pthread_spin_unlock(&ct->hldr_lock);
+ 		tur_set_async_timeout(c);
+ 		setup_thread_attr(&attr, 32 * 1024, 1);
+-		r = pthread_create(&ct->thread, &attr, tur_thread, c);
++		r = pthread_create(&ct->thread, &attr, tur_thread, ct);
+ 		if (r) {
+ 			pthread_mutex_unlock(&ct->lock);
+ 			ct->thread = 0;
++			ct->holders--;
+ 			condlog(3, "%d:%d: failed to start tur thread, using"
+ 				" sync mode", TUR_DEVT(ct));
+-			return tur_check(c);
++			return tur_check(c->fd, c->timeout, c->message);
+ 		}
+ 		pthread_attr_destroy(&attr);
+ 		tur_timeout(&tsp);
+ 		r = pthread_cond_timedwait(&ct->active, &ct->lock, &tsp);
+ 		tur_status = ct->state;
++		strncpy(c->message, ct->message,CHECKER_MSG_LEN);
++		c->message[CHECKER_MSG_LEN -1] = '\0';
+ 		pthread_mutex_unlock(&ct->lock);
+ 		if (ct->thread &&
+ 		    (tur_status == PATH_PENDING || tur_status == PATH_UNCHECKED)) {
+Index: multipath-tools-120123/libmultipath/discovery.c
+===================================================================
+--- multipath-tools-120123.orig/libmultipath/discovery.c
++++ multipath-tools-120123/libmultipath/discovery.c
+@@ -842,6 +842,7 @@ get_state (struct path * pp, int daemon)
+ 		}
+ 		checker_set_fd(c, pp->fd);
+ 		if (checker_init(c, pp->mpp?&pp->mpp->mpcontext:NULL)) {
++			memset(c, 0x0, sizeof(struct checker));
+ 			condlog(3, "%s: checker init failed", pp->dev);
+ 			return PATH_UNCHECKED;
+ 		}
diff --git a/0002-RH-dont_start_with_no_config.patch b/0002-RH-dont_start_with_no_config.patch
new file mode 100644
index 0000000..7efd925
--- /dev/null
+++ b/0002-RH-dont_start_with_no_config.patch
@@ -0,0 +1,16 @@
+---
+ multipathd/multipathd.service |    1 +
+ 1 file changed, 1 insertion(+)
+
+Index: multipath-tools-110916/multipathd/multipathd.service
+===================================================================
+--- multipath-tools-110916.orig/multipathd/multipathd.service
++++ multipath-tools-110916/multipathd/multipathd.service
+@@ -2,6 +2,7 @@
+ Description=Device-Mapper Multipath Device Controller
+ Before=iscsi.service iscsid.service
+ After=syslog.target
++ConditionPathExists=/etc/multipath.conf
+ 
+ [Service]
+ Type=forking
diff --git a/0010-RH-multipath-rules-udev-changes.patch b/0003-RH-multipath.rules.patch
similarity index 60%
rename from 0010-RH-multipath-rules-udev-changes.patch
rename to 0003-RH-multipath.rules.patch
index 4250ec7..97e5397 100644
--- a/0010-RH-multipath-rules-udev-changes.patch
+++ b/0003-RH-multipath.rules.patch
@@ -1,42 +1,47 @@
-From 5a43356b54c2672441ce67cd9602904a5df04117 Mon Sep 17 00:00:00 2001
-From: Fabio M. Di Nitto <fdinitto at redhat.com>
-Date: Mon, 19 Oct 2009 07:07:01 +0200
-Subject: [PATCH 10/12] RH: multipath rules + udev changes
-
-Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
 ---
-:100644 100644 ac97749... 064196d... M	multipath/multipath.rules
  multipath/Makefile        |    6 +++---
- multipath/multipath.rules |   18 +++++++++++-------
- 2 files changed, 14 insertions(+), 10 deletions(-)
+ multipath/multipath.rules |   29 +++++++++++++++++++++++------
+ 2 files changed, 26 insertions(+), 9 deletions(-)
 
-Index: multipath-tools/multipath/multipath.rules
+Index: multipath-tools-111219/multipath/multipath.rules
 ===================================================================
---- multipath-tools.orig/multipath/multipath.rules
-+++ multipath-tools/multipath/multipath.rules
-@@ -1,7 +1,11 @@
+--- multipath-tools-111219.orig/multipath/multipath.rules
++++ multipath-tools-111219/multipath/multipath.rules
+@@ -1,7 +1,24 @@
 -#
 -# udev rules for multipathing.
 -# The persistent symlinks are created with the kpartx rules
 -#
--
--# socket for uevents
--SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event"
 +# multipath wants the devmaps presented as meaninglful device names
 +# so name them after their devmap name
 +SUBSYSTEM!="block", GOTO="end_mpath"
+ 
+-# socket for uevents
+-SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event"
++ENV{MPATH_SBIN_PATH}="/sbin"
++TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin"
++
++ACTION=="add", ENV{DEVTYPE}!="partition", \
++	ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \
++	PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -c $tempnode", \
++	ENV{DM_MULTIPATH_DEVICE_PATH}="1"
++
++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DEVTYPE}!="partition", \
++	RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
++
 +RUN+="socket:/org/kernel/dm/multipath_event"
 +KERNEL!="dm-*", GOTO="end_mpath"
 +ACTION!="change", GOTO="end_mpath"
-+ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
++ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10"
 +ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
++ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
 +ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
-+RUN+="$env{DM_SBIN_PATH}/kpartx -a -p p $tempnode"
++RUN+="$env{MPATH_SBIN_PATH}/kpartx -a -p p $tempnode"
 +LABEL="end_mpath"
-Index: multipath-tools/multipath/Makefile
+Index: multipath-tools-111219/multipath/Makefile
 ===================================================================
---- multipath-tools.orig/multipath/Makefile
-+++ multipath-tools/multipath/Makefile
+--- multipath-tools-111219.orig/multipath/Makefile
++++ multipath-tools-111219/multipath/Makefile
 @@ -21,15 +21,15 @@ $(EXEC): $(OBJS)
  install:
  	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
@@ -52,7 +57,7 @@ Index: multipath-tools/multipath/Makefile
  
  uninstall:
 -	rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
-+	rm $(DESTDIR)/lib/udev/rules.d/multipath.rules
++	rm $(DESTDIR)/lib/udev/rules.d/40-multipath.rules
  	rm $(DESTDIR)$(bindir)/$(EXEC)
  	rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
  	rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
diff --git a/0004-RH-update-init-script.patch b/0004-RH-update-init-script.patch
new file mode 100644
index 0000000..a0b99ac
--- /dev/null
+++ b/0004-RH-update-init-script.patch
@@ -0,0 +1,76 @@
+---
+ multipathd/multipathd.init.redhat |   27 ++++++---------------------
+ 1 file changed, 6 insertions(+), 21 deletions(-)
+
+Index: multipath-tools-111219/multipathd/multipathd.init.redhat
+===================================================================
+--- multipath-tools-111219.orig/multipathd/multipathd.init.redhat
++++ multipath-tools-111219/multipathd/multipathd.init.redhat
+@@ -73,14 +73,6 @@ start() {
+ 	echo
+ }
+ 
+-force_stop() {
+-	echo -n $"Stopping $prog daemon: "
+-	killproc $DAEMON
+-	RETVAL=$?
+-	[ $RETVAL -eq 0 ] && rm -f $lockdir/$prog
+-	echo
+-}
+-
+ stop() {
+         root_dev=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/mtab)
+ 	dm_num=`dmsetup info -c --noheadings -o minor $root_dev 2> /dev/null`
+@@ -89,7 +81,11 @@ stop() {
+ 		[ -d $syspath/$root_dm_device ] && teardown_slaves $syspath/$root_dm_device
+ 	fi
+ 
+-	force_stop
++	echo -n $"Stopping $prog daemon: "
++	killproc $DAEMON
++	RETVAL=$?
++	[ $RETVAL -eq 0 ] && rm -f $lockdir/$prog
++	echo
+ }
+ 
+ restart() {
+@@ -97,11 +93,6 @@ restart() {
+ 	start
+ }
+ 
+-force_restart() {
+-	force_stop
+-	start
+-}
+-
+ reload() {
+ 	echo -n "Reloading $prog: "
+ 	trap "" SIGHUP
+@@ -117,18 +108,12 @@ start)
+ stop)
+ 	stop
+ 	;;
+-force-stop)
+-	force_stop
+-	;;
+ force-reload|reload)
+ 	reload
+ 	;;
+ restart)
+ 	restart
+ 	;;
+-force-restart)
+-	force_restart
+-	;;
+ condrestart|try-restart)
+ 	if [ -f $lockdir/$prog ]; then
+ 	    restart
+@@ -139,7 +124,7 @@ status)
+ 	RETVAL=$?
+ 	;;
+ *)
+-	echo $"Usage: $0 {start|stop|force-stop|status|restart|force-restart|condrestart|reload}"
++	echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+ 	RETVAL=2
+ esac
+ 
diff --git a/0008-RH-Make-build-system-RH-Fedora-friendly.patch b/0006-RH-Make-build-system-RH-Fedora-friendly.patch
similarity index 52%
rename from 0008-RH-Make-build-system-RH-Fedora-friendly.patch
rename to 0006-RH-Make-build-system-RH-Fedora-friendly.patch
index 9e6e3a0..7d5db31 100644
--- a/0008-RH-Make-build-system-RH-Fedora-friendly.patch
+++ b/0006-RH-Make-build-system-RH-Fedora-friendly.patch
@@ -8,15 +8,16 @@ Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
 :100644 100644 7ec25d5... 06fb625... M	Makefile.inc
 :100644 100644 21e4ad4... 06d79c0... M	kpartx/Makefile
 :100644 100644 32d9ef5... 25e1483... M	multipathd/Makefile
- Makefile.inc        |    2 +-
- kpartx/Makefile     |    8 ++++----
- multipathd/Makefile |    1 +
- 3 files changed, 6 insertions(+), 5 deletions(-)
+ Makefile.inc          |    2 +-
+ kpartx/Makefile       |    8 ++++----
+ libmultipath/Makefile |    2 ++
+ multipathd/Makefile   |    1 +
+ 4 files changed, 8 insertions(+), 5 deletions(-)
 
-diff --git a/Makefile.inc b/Makefile.inc
-index 7ec25d5..06fb625 100644
---- a/Makefile.inc
-+++ b/Makefile.inc
+Index: multipath-tools-120123/Makefile.inc
+===================================================================
+--- multipath-tools-120123.orig/Makefile.inc
++++ multipath-tools-120123/Makefile.inc
 @@ -28,7 +28,7 @@ libudevdir  = ${prefix}/lib/udev
  multipathdir = $(TOPDIR)/libmultipath
  mandir      = $(prefix)/usr/share/man/man8
@@ -25,12 +26,12 @@ index 7ec25d5..06fb625 100644
 +rcdir	    = $(prefix)/etc/rc.d/init.d
  syslibdir   = $(prefix)/$(LIB)
  libdir	    = $(prefix)/$(LIB)/multipath
- 
-diff --git a/kpartx/Makefile b/kpartx/Makefile
-index 21e4ad4..06d79c0 100644
---- a/kpartx/Makefile
-+++ b/kpartx/Makefile
-@@ -20,10 +20,10 @@ $(EXEC): $(OBJS)
+ unitdir     = $(prefix)/lib/systemd/system
+Index: multipath-tools-120123/kpartx/Makefile
+===================================================================
+--- multipath-tools-120123.orig/kpartx/Makefile
++++ multipath-tools-120123/kpartx/Makefile
+@@ -26,10 +26,10 @@ $(EXEC): $(OBJS)
  install: $(EXEC) $(EXEC).8
  	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
  	$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
@@ -45,18 +46,31 @@ index 21e4ad4..06d79c0 100644
  	$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
  	$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
  
-diff --git a/multipathd/Makefile b/multipathd/Makefile
-index 32d9ef5..25e1483 100644
---- a/multipathd/Makefile
-+++ b/multipathd/Makefile
+Index: multipath-tools-120123/multipathd/Makefile
+===================================================================
+--- multipath-tools-120123.orig/multipathd/Makefile
++++ multipath-tools-120123/multipathd/Makefile
 @@ -35,6 +35,7 @@ install:
  	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
  	$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
  	$(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir)
 +	$(INSTALL_PROGRAM) -m 755 multipathd.init.redhat $(DESTDIR)$(rcdir)/$(EXEC)
+ 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(unitdir)
+ 	$(INSTALL_PROGRAM) -m 644 $(EXEC).service $(DESTDIR)$(unitdir)
  	$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
- 	$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
+Index: multipath-tools-120123/libmultipath/Makefile
+===================================================================
+--- multipath-tools-120123.orig/libmultipath/Makefile
++++ multipath-tools-120123/libmultipath/Makefile
+@@ -39,9 +39,11 @@ install:
+ 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir)
+ 	$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS)
+ 	$(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir)
++	ln -sf $(LIBS) $(DESTDIR)$(syslibdir)/$(DEVLIB)
  
--- 
-1.6.5.1
-
+ uninstall:
+ 	rm -f $(DESTDIR)$(syslibdir)/$(LIBS)
++	rm -f $(DESTDIR)$(syslibdir)/$(DEVLIB)
+ 
+ clean:
+ 	rm -f core *.a *.o *.gz *.so *.so.*
diff --git a/0009-RH-multipathd-blacklist-all-by-default.patch b/0007-RH-multipathd-blacklist-all-by-default.patch
similarity index 51%
rename from 0009-RH-multipathd-blacklist-all-by-default.patch
rename to 0007-RH-multipathd-blacklist-all-by-default.patch
index df4b4c7..6e64237 100644
--- a/0009-RH-multipathd-blacklist-all-by-default.patch
+++ b/0007-RH-multipathd-blacklist-all-by-default.patch
@@ -12,52 +12,49 @@ Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
 ---
 :100644 100644 e7e962e... 5aa1ab0... M	libmultipath/config.c
 :100644 100644 86b1320... 7e90e75... M	libmultipath/config.h
- libmultipath/config.c |   18 +++++++++++++++++-
+ libmultipath/config.c |   16 ++++++++++++++++
  libmultipath/config.h |    1 +
- 2 files changed, 18 insertions(+), 1 deletions(-)
+ 2 files changed, 17 insertions(+)
 
-diff --git a/libmultipath/config.c b/libmultipath/config.c
-index e7e962e..5aa1ab0 100644
---- a/libmultipath/config.c
-+++ b/libmultipath/config.c
-@@ -19,6 +19,7 @@
- #include "blacklist.h"
+Index: multipath-tools-111219/libmultipath/config.c
+===================================================================
+--- multipath-tools-111219.orig/libmultipath/config.c
++++ multipath-tools-111219/libmultipath/config.c
+@@ -20,6 +20,7 @@
  #include "defaults.h"
  #include "prio.h"
+ #include "devmapper.h"
 +#include "version.h"
  
  static int
  hwe_strmatch (struct hwentry *hwe1, struct hwentry *hwe2)
-@@ -463,8 +464,23 @@ load_config (char * file)
- 			condlog(0, "error parsing config file");
- 			goto out;
- 		}
-+	} else {
+@@ -539,6 +540,21 @@ load_config (char * file)
+ 
+ 	} else {
+ 		init_keywords();
 +		condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
 +		condlog(0, "A default multipath.conf file is located at");
-+		condlog(0,
-+"/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf",
-+			MULTIPATH_VERSION(VERSION_CODE));
-+		conf->blist_devnode = vector_alloc();
-+		if (!conf->blist_devnode) {
-+			condlog(0, "cannot allocate blacklist\n");
-+			goto out;
++		condlog(0, "/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf", MULTIPATH_VERSION(VERSION_CODE));
++		if (conf->blist_devnode == NULL) {
++			conf->blist_devnode = vector_alloc();
++			if (!conf->blist_devnode) {
++				condlog(0, "cannot allocate blacklist\n");
++				goto out;
++			}
 +		}
 +		if (store_ble(conf->blist_devnode, strdup(".*"),
-+			      ORIGIN_NO_CONFIG)) {
++		              ORIGIN_NO_CONFIG)) {
 +			condlog(0, "cannot store default no-config blacklist\n");
 +			goto out;
 +		}
  	}
--
+ 
  	/*
- 	 * remove duplica in hwtable. config file takes precedence
- 	 * over build-in hwtable
-diff --git a/libmultipath/config.h b/libmultipath/config.h
-index 86b1320..7e90e75 100644
---- a/libmultipath/config.h
-+++ b/libmultipath/config.h
-@@ -5,6 +5,7 @@
+Index: multipath-tools-111219/libmultipath/config.h
+===================================================================
+--- multipath-tools-111219.orig/libmultipath/config.h
++++ multipath-tools-111219/libmultipath/config.h
+@@ -6,6 +6,7 @@
  
  #define ORIGIN_DEFAULT 0
  #define ORIGIN_CONFIG  1
@@ -65,6 +62,3 @@ index 86b1320..7e90e75 100644
  
  enum devtypes {
  	DEV_NONE,
--- 
-1.6.5.1
-
diff --git a/0008-RH-add-mpathconf.patch b/0008-RH-add-mpathconf.patch
new file mode 100644
index 0000000..800c113
--- /dev/null
+++ b/0008-RH-add-mpathconf.patch
@@ -0,0 +1,546 @@
+---
+ libmultipath/config.c |    1 
+ multipath/Makefile    |    5 
+ multipath/main.c      |    4 
+ multipath/mpathconf   |  351 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ multipath/mpathconf.8 |  116 ++++++++++++++++
+ 5 files changed, 475 insertions(+), 2 deletions(-)
+
+Index: multipath-tools-111219/libmultipath/config.c
+===================================================================
+--- multipath-tools-111219.orig/libmultipath/config.c
++++ multipath-tools-111219/libmultipath/config.c
+@@ -543,6 +543,7 @@ load_config (char * file)
+ 		condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
+ 		condlog(0, "A default multipath.conf file is located at");
+ 		condlog(0, "/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf", MULTIPATH_VERSION(VERSION_CODE));
++		condlog(0, "You can run /sbin/mpathconf to create or modify /etc/multipath.conf");
+ 		if (conf->blist_devnode == NULL) {
+ 			conf->blist_devnode = vector_alloc();
+ 			if (!conf->blist_devnode) {
+Index: multipath-tools-111219/multipath/Makefile
+===================================================================
+--- multipath-tools-111219.orig/multipath/Makefile
++++ multipath-tools-111219/multipath/Makefile
+@@ -17,22 +17,27 @@ $(EXEC): $(OBJS)
+ 	$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS)
+ 	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
+ 	$(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
++	$(GZIP) mpathconf.8 > mpathconf.8.gz
+ 
+ install:
+ 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
+ 	$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
++	$(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/
+ 	$(INSTALL_PROGRAM) -d $(DESTDIR)/lib/udev/rules.d
+ 	$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/lib/udev/rules.d/40-multipath.rules
+ 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
+ 	$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
+ 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
+ 	$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir)
++	$(INSTALL_PROGRAM) -m 644 mpathconf.8.gz $(DESTDIR)$(mandir)
+ 
+ uninstall:
+ 	rm $(DESTDIR)/lib/udev/rules.d/40-multipath.rules
+ 	rm $(DESTDIR)$(bindir)/$(EXEC)
++	rm $(DESTDIR)$(bindir)/mpathconf
+ 	rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
+ 	rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
++	rm $(DESTDIR)$(mandir)/mpathconf.8.gz
+ 
+ clean:
+ 	rm -f core *.o $(EXEC) *.gz
+Index: multipath-tools-111219/multipath/main.c
+===================================================================
+--- multipath-tools-111219.orig/multipath/main.c
++++ multipath-tools-111219/multipath/main.c
+@@ -406,10 +406,10 @@ main (int argc, char *argv[])
+ 		exit(1);
+ 	}
+ 
+-	if (dm_prereq())
++	if (load_config(DEFAULT_CONFIGFILE))
+ 		exit(1);
+ 
+-	if (load_config(DEFAULT_CONFIGFILE))
++	if (dm_prereq())
+ 		exit(1);
+ 
+ 	if (sysfs_init(conf->sysfs_dir, FILE_NAME_SIZE)) {
+Index: multipath-tools-111219/multipath/mpathconf
+===================================================================
+--- /dev/null
++++ multipath-tools-111219/multipath/mpathconf
+@@ -0,0 +1,351 @@
++#!/bin/sh
++#
++# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
++#
++# This file is part of the device-mapper-multipath package.
++#
++# This copyrighted material is made available to anyone wishing to use,
++# modify, copy, or redistribute it subject to the terms and conditions
++# of the GNU General Public License v.2.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software Foundation,
++# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++
++#
++# Simple editting of /etc/multipath.conf
++# This program was largely ripped off from lvmconf
++#
++
++unset ENABLE FIND FRIENDLY MODULE MULTIPATHD CHKCONFIG HAVE_DISABLE HAVE_FIND HAVE_BLACKLIST HAVE_DEFAULTS HAVE_FRIENDLY HAVE_MULTIPATHD HAVE_CHKCONFIG HAVE_MODULE SHOW_STATUS CHANGED_CONFIG
++
++DEFAULT_CONFIGFILE="/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf"
++CONFIGFILE="/etc/multipath.conf"
++MULTIPATHDIR="/etc/multipath"
++TMPFILE=/etc/multipath/.multipath.conf.tmp
++
++function usage
++{
++	echo "usage: $0 <command>"
++	echo ""
++	echo "Commands:"
++	echo "Enable: --enable "
++	echo "Disable: --disable"
++	echo "Set user_friendly_names (Default n): --user_friendly_names <y|n>"
++	echo "Set find_multipaths (Default n): --find_multipaths <y|n>"
++	echo "Load the dm-multipath modules on enable (Default y): --with_module <y|n>"
++	echo "start/stop/reload multipathd (Default n): --with_multipathd <y|n>"
++	echo "chkconfig on/off multipathd (Default y): --with_chkconfig <y|n>"
++	echo ""
++}
++
++function parse_args
++{
++	while [ -n "$1" ]; do
++		case $1 in
++			--enable)
++				ENABLE=1
++				shift
++				;;
++			--disable)
++				ENABLE=0
++				shift
++				;;
++			--user_friendly_names)
++				if [ -n "$2" ]; then
++					FRIENDLY=$2
++					shift 2
++				else
++					usage
++					exit 1
++				fi
++				;;
++			--find_multipaths)
++				if [ -n "$2" ]; then
++					FIND=$2
++					shift 2
++				else
++					usage
++					exit 1
++				fi
++				;;
++			--with_module)
++				if [ -n "$2" ]; then
++					MODULE=$2
++					shift 2
++				else
++					usage
++					exit 1
++				fi
++				;;
++			--with_multipathd)
++				if [ -n "$2" ]; then
++					MULTIPATHD=$2
++					shift 2
++				else
++					usage
++					exit 1
++				fi
++				;;
++			--with_chkconfig)
++				if [ -n "$2" ]; then
++					CHKCONFIG=$2
++					shift 2
++				else
++					usage
++					exit 1
++				fi
++				;;
++			*)
++				usage
++				exit
++		esac
++	done
++}
++
++function validate_args
++{
++	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$MODULE" ]; then
++		echo "ignoring extra parameters on disable"
++		FRIENDLY=""
++		FIND=""
++		MODULE=""
++	fi
++	if [ -n "$FRIENDLY" ] && [ "$FRIENDLY" != "y" -a "$FRIENDLY" != "n" ]; then
++		echo "--user_friendly_names must be either 'y' or 'n'"
++		exit 1
++	fi
++	if [ -n "$FIND" ] && [ "$FIND" != "y" -a "$FIND" != "n" ]; then
++		echo "--find_multipaths must be either 'y' or 'n'"
++		exit 1
++	fi
++	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" ]; then
++		SHOW_STATUS=1
++	fi
++	if [ -n "$MODULE" ] && [ "$MODULE" != "y" -a "$MODULE" != "n" ]; then
++		echo "--with_module must be either 'y' or 'n'"
++		exit 1
++	fi
++	if [ -n "$MULTIPATHD" ] && [ "$MULTIPATHD" != "y" -a "$MULTIPATHD" != "n" ]; then
++		echo "--with_multipathd must be either 'y' or 'n'"
++		exit 1
++	fi
++	if [ -n "$CHKCONFIG" ] && [ "$CHKCONFIG" != "y" -a "$CHKCONFIG" != "n" ]; then
++		echo "--with_chkconfig must be either 'y' or 'n'"
++		exit 1
++	fi
++}
++
++umask 0077
++
++parse_args "$@"
++
++validate_args
++
++if [ ! -d "$MULTIPATHDIR" ]; then
++	echo "/etc/multipath/ does not exist. failing"
++	exit 1
++fi
++
++rm $TMPFILE 2> /dev/null
++if [ -f "$CONFIGFILE" ]; then
++	cp $CONFIGFILE $TMPFILE
++elif [ -f "$DEFAULT_CONFIGFILE" ]; then
++	cp $DEFAULT_CONFIGFILE $TMPFILE
++else
++	touch $TMPFILE
++fi
++
++if grep -q "^blacklist[[:space:]]*{" $TMPFILE ; then
++	HAVE_BLACKLIST=1
++fi
++
++if grep -q "^defaults[[:space:]]*{" $TMPFILE ; then
++	HAVE_DEFAULTS=1
++fi
++
++if [ -z "$MODULE" -o "$MODULE" = "y" ]; then
++	if lsmod | grep -q "dm_multipath" ; then
++		HAVE_MODULE=1
++	else
++		HAVE_MODULE=0
++	fi
++fi
++
++if [ "$MULTIPATHD" = "y" ]; then
++	if service multipathd status > /dev/null ; then
++		HAVE_MULTIPATHD=1
++	else
++		HAVE_MULTIPATHD=0
++	fi
++fi
++
++if [ -z "$CHKCONFIG" -o "$CHKCONFIG" = "y" ]; then
++	chkconfig --list multipathd > /dev/null 2>&1
++	if [ $? != 0 ]; then
++		chkconfig --add multipathd
++	fi
++	if chkconfig --list multipathd | grep -q "on" ; then
++		HAVE_CHKCONFIG=1
++	else
++		HAVE_CHKCONFIG=0
++	fi
++fi
++
++if [ "$HAVE_BLACKLIST" = "1" ]; then
++	if sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*devnode \"\.\?\*\"" ; then
++		HAVE_DISABLE=1
++	elif sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[#[:space:]]*devnode \"\.\?\*\"" ; then
++		HAVE_DISABLE=0
++	fi
++fi
++
++if [ "$HAVE_DEFAULTS" = "1" ]; then
++	if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)" ; then
++		HAVE_FIND=1
++	elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)" ; then
++		HAVE_FIND=0
++	fi
++	if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)" ; then
++		HAVE_FRIENDLY=1
++	elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)" ; then
++		HAVE_FRIENDLY=0
++	fi
++fi
++
++if [ -n "$SHOW_STATUS" ]; then
++	if [ -z "$HAVE_DISABLE" -o "$HAVE_DISABLE" = 0 ]; then
++		echo "multipath is enabled"
++	else
++		echo "multipath is disabled"
++	fi
++	if [ -z "$HAVE_FIND"  -o "$HAVE_FIND" = 0 ]; then
++		echo "find_multipaths is disabled"
++	else
++		echo "find_multipaths is enabled"
++	fi
++	if [ -z "$HAVE_FRIENDLY" -o "$HAVE_FRIENDLY" = 0 ]; then
++		echo "user_friendly_names is disabled"
++	else
++		echo "user_friendly_names is enabled"
++	fi
++	if [ -n "$HAVE_MODULE" ]; then
++		if [ "$HAVE_MODULE" = 1 ]; then
++			echo "dm_multipath module is loaded"
++		else
++			echo "dm_multipath module is not loaded"
++		fi
++	fi
++	if [ -n "$HAVE_MULTIPATHD" ]; then
++		service multipathd status
++	fi
++	if [ -n "$HAVE_CHKCONFIG" ]; then
++		if [ "$HAVE_CHKCONFIG" = 1 ]; then
++			echo "multipathd is chkconfiged on"
++		else
++			echo "multipathd is chkconfiged off"
++		fi
++	fi
++	exit 0
++fi
++
++if [ -z "$HAVE_BLACKLIST" ]; then
++	cat >> $TMPFILE <<- _EOF_
++
++blacklist {
++}
++_EOF_
++fi
++
++if [ -z "$HAVE_DEFAULTS" ]; then
++	cat >> $TMPFILE <<- _EOF_
++
++defaults {
++}
++_EOF_
++fi
++
++if [ "$ENABLE" = 1 ]; then
++	if [ "$HAVE_DISABLE" = 1 ]; then
++		sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*devnode \"\.\?\*\"/#	devnode ".*"/' $TMPFILE
++	fi
++elif [ "$ENABLE" = 0 ]; then
++	if [ -z "$HAVE_DISABLE" ]; then
++		sed -i '/^blacklist[[:space:]]*{/ a\
++	devnode "*"
++' $TMPFILE
++	elif [ "$HAVE_DISABLE" = 0 ]; then
++		sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*#[#[:space:]]*devnode \"\.\?\*\"/	devnode ".*"/' $TMPFILE
++	fi
++fi
++
++if [ "$FIND" = "n" ]; then
++	if [ "$HAVE_FIND" = 1 ]; then
++		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)/	find_multipaths no/' $TMPFILE
++		CHANGED_CONFIG=1
++	fi
++elif [ "$FIND" = "y" ]; then
++	if [ -z "$HAVE_FIND" ]; then
++		sed -i '/^defaults[[:space:]]*{/ a\
++	find_multipaths yes
++' $TMPFILE
++		CHANGED_CONFIG=1
++	elif [ "$HAVE_FIND" = 0 ]; then
++		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)/	find_multipaths yes/' $TMPFILE
++		CHANGED_CONFIG=1
++	fi
++fi
++
++if [ "$FRIENDLY" = "n" ]; then
++	if [ "$HAVE_FRIENDLY" = 1 ]; then
++		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)/	user_friendly_names no/' $TMPFILE
++		CHANGED_CONFIG=1
++	fi
++elif [ "$FRIENDLY" = "y" ]; then
++	if [ -z "$HAVE_FRIENDLY" ]; then
++		sed -i '/^defaults[[:space:]]*{/ a\
++	user_friendly_names yes
++' $TMPFILE
++		CHANGED_CONFIG=1
++	elif [ "$HAVE_FRIENDLY" = 0 ]; then
++		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)/	user_friendly_names yes/' $TMPFILE
++		CHANGED_CONFIG=1
++	fi
++fi
++
++if [ -f "$CONFIGFILE" ]; then
++	cp $CONFIGFILE $CONFIGFILE.old
++	if [ $? != 0 ]; then
++		echo "failed to backup old config file, $CONFIGFILE not updated"
++		exit 1
++	fi
++fi
++
++cp $TMPFILE $CONFIGFILE
++if [ $? != 0 ]; then
++	echo "failed to copy new config file into place, check $CONFIGFILE is still OK"
++	exit 1
++fi
++
++rm -f $TMPFILE
++
++if [ "$ENABLE" = 1 ]; then
++	if [ "$HAVE_MODULE" = 0 ]; then
++		modprobe dm_multipath
++	fi
++	if [ "$HAVE_MULTIPATHD" = 0 ]; then
++		service multipathd start
++	fi
++	if [ "$HAVE_CHKCONFIG" = 0 ]; then
++		chkconfig multipathd on
++	fi
++elif [ "$ENABLE" = 0 ]; then
++	if [ "$HAVE_MULTIPATHD" = 1 ]; then
++		service multipathd stop
++	fi
++	if [ "$HAVE_CHKCONFIG" = 1 ]; then
++		chkconfig multipathd off
++	fi
++elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then
++	service multipathd reload
++fi
+Index: multipath-tools-111219/multipath/mpathconf.8
+===================================================================
+--- /dev/null
++++ multipath-tools-111219/multipath/mpathconf.8
+@@ -0,0 +1,116 @@
++.TH MPATHCONF 8 "June 2010" "" "Linux Administrator's Manual"
++.SH NAME
++mpathconf - A tool for configuring device-mapper-multipath
++.SH SYNOPSIS
++.B mpathconf
++.RB [\| commands \|]
++.RB [\| options \|]
++.SH DESCRIPTION
++.B mpathconf
++is a utility that creates or modifies
++.B /etc/multipath.conf.
++It can enable or disable multipathing and configure some common options.
++.B mpathconf
++can also load the
++.B dm_multipath
++module, start and stop the
++.B multipathd
++daemon, and configure the
++.B multipathd
++service to start automatically or not. If
++.B mpathconf
++is called with no commands, it will display the current configuration.
++
++The default options for mpathconf are
++.B --with_module
++and
++.B --with_chkconfig.
++The
++.B --with_multipathd
++option is not set by default.  Enabling multipathing will load the
++.B dm_multipath
++module and chkconfig
++.B multipathd
++to start on the next boot, but it will not immediately start it. This is so
++that users can manually edit their config file if necessary, before starting
++.B multipathd.
++
++If
++.B /etc/multipath.conf
++already exists, mpathconf will edit it. If it does not exist, mpathconf will
++use
++.B /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf
++as the starting file. This file has
++.B user_friendly_names
++set. If this file does not exist, mpathconf will create
++.B /etc/multipath.conf
++from scratch.  For most users, this means that
++.B user_friendly_names
++will be set by default, unless they use the
++.B --user_friendly_names n
++command.
++.SH COMMANDS
++.TP
++.B --enable
++Removes any line that blacklists all device nodes from the
++.B /etc/multipath.conf
++blacklist section.
++.TP
++.B --disable
++Adds a line that blacklists all device nodes to the
++.B /etc/multipath.conf
++blacklist section. If no blacklist section exists, it will create one.
++.TP
++.B --user_friendly_name \fP { \fBy\fP | \fBn\fP }
++If set to \fBy\fP, this adds the line
++.B user_friendly_names yes
++to the
++.B /etc/multipath.conf
++defaults section. If set to \fBn\fP, this removes the line, if present. This
++command can be used along with any other command.
++.TP
++.B --find_multipaths\fP { \fBy\fP | \fBn\fP }
++If set to \fBy\fP, this adds the line
++.B find_multipaths yes
++to the
++.B /etc/multipath.conf
++defaults section. If set to \fBn\fP, this removes the line, if present. This
++command can be used aldong with any other command.
++.SH OPTIONS
++.TP
++.B --with_module\fP { \fBy\fP | \fBn\fP }
++If set to \fBy\fP, this runs
++.B modprobe dm_multipath
++to install the multipath modules. This option only works with the
++.B --enable
++command. This option is set to \fBy\fP by default.
++.TP
++.B --with_multipathd { \fBy\fP | \fBn\fP }
++If set to \fBy\fP, this runs
++.B service multipathd start
++to start the multipathd daemon on \fB--enable\fP,
++.B service multipathd stop
++to start the multipathd daemon on \fB--disable\fP, and
++.B service multipathd reload
++to reconfigure multipathd on \fB--user_frindly_names\fP and
++\fB--find_multipaths\fP.
++This option is set to \fBn\fP by default.
++.TP
++.B --with_chkconfig { \fBy\fP | \fBn\fP }
++If set to \fBy\fP, this runs
++.B chkconfig multipathd on
++to set multipathd to start automatically on \fB--enable\fP and
++.B chkconfig multipathd off
++to stop multipathd for starting automatically on \fB--disable\fP.
++This option is set to \fBy\fP by default.
++.SH FILES
++.BR /etc/multipath.conf
++.SH "SEE ALSO"
++.BR multipath.conf (5),
++.BR chkconfig (8),
++.BR modprobe (8),
++.BR multipath (8),
++.BR multipathd (8),
++.BR service (8),
++.SH AUTHOR
++Benjamin Marzinski <bmarzins at redhat.com>
diff --git a/0021-RHBZ-548874-add-find-multipaths.patch b/0009-RH-add-find-multipaths.patch
similarity index 55%
rename from 0021-RHBZ-548874-add-find-multipaths.patch
rename to 0009-RH-add-find-multipaths.patch
index e1229a7..b706687 100644
--- a/0021-RHBZ-548874-add-find-multipaths.patch
+++ b/0009-RH-add-find-multipaths.patch
@@ -1,26 +1,24 @@
 ---
  libmultipath/Makefile    |    2 
- libmultipath/alias.c     |  152 ------------------------------
+ libmultipath/alias.c     |  151 ---------------------------------------
  libmultipath/alias.h     |    1 
- libmultipath/config.c    |    5 -
+ libmultipath/config.c    |    1 
  libmultipath/config.h    |    1 
- libmultipath/configure.c |   22 ++++
+ libmultipath/configure.c |   14 +++
  libmultipath/defaults.h  |    2 
- libmultipath/dict.c      |   34 ++++++
- libmultipath/file.c      |  178 +++++++++++++++++++++++++++++++++++
+ libmultipath/dict.c      |   34 ++++++++
+ libmultipath/file.c      |  178 +++++++++++++++++++++++++++++++++++++++++++++++
  libmultipath/file.h      |   11 ++
- libmultipath/finder.c    |  165 +++++++++++++++++++++++++++++++++
- libmultipath/finder.h    |   18 +++
- multipath/Makefile       |    2 
- multipath/main.c         |    2 
- multipath/mpathconf      |  234 +++++++++++++++++++++++++++++++++++++++++++++++
- multipathd/main.c        |   24 +++-
- 16 files changed, 690 insertions(+), 163 deletions(-)
+ libmultipath/finder.c    |  165 +++++++++++++++++++++++++++++++++++++++++++
+ libmultipath/finder.h    |   18 ++++
+ multipath/main.c         |    4 -
+ multipathd/main.c        |    6 +
+ 14 files changed, 437 insertions(+), 151 deletions(-)
 
-Index: multipath-tools/libmultipath/alias.c
+Index: multipath-tools-111219/libmultipath/alias.c
 ===================================================================
---- multipath-tools.orig/libmultipath/alias.c
-+++ multipath-tools/libmultipath/alias.c
+--- multipath-tools-111219.orig/libmultipath/alias.c
++++ multipath-tools-111219/libmultipath/alias.c
 @@ -3,19 +3,16 @@
   * Copyright (c) 2005 Benjamin Marzinski, Redhat
   */
@@ -42,10 +40,11 @@ Index: multipath-tools/libmultipath/alias.c
  
  
  /*
-@@ -37,149 +34,6 @@
+@@ -36,148 +33,6 @@
+  * See the file COPYING included with this distribution for more details.
   */
  
- static int
+-static int
 -ensure_directories_exist(char *str, mode_t dir_mode)
 -{
 -	char *pathname;
@@ -187,12 +186,10 @@ Index: multipath-tools/libmultipath/alias.c
 -	close(fd);
 -	return -1;
 -}
--
--static int
- format_devname(char *name, int id, int len)
- {
- 	int pos;
-@@ -364,7 +218,7 @@ get_user_friendly_alias(char *wwid, char
+ 
+ static int
+ format_devname(char *name, int id, int len, char *prefix)
+@@ -366,7 +221,7 @@ get_user_friendly_alias(char *wwid, char
  		return NULL;
  	}
  
@@ -201,7 +198,7 @@ Index: multipath-tools/libmultipath/alias.c
  	if (fd < 0)
  		return NULL;
  
-@@ -414,7 +268,7 @@ get_user_friendly_wwid(char *alias, char
+@@ -416,7 +271,7 @@ get_user_friendly_wwid(char *alias, char
  		return NULL;
  	}
  
@@ -210,66 +207,40 @@ Index: multipath-tools/libmultipath/alias.c
  	if (fd < 0)
  		return NULL;
  
-Index: multipath-tools/libmultipath/alias.h
+Index: multipath-tools-111219/libmultipath/alias.h
 ===================================================================
---- multipath-tools.orig/libmultipath/alias.h
-+++ multipath-tools/libmultipath/alias.h
+--- multipath-tools-111219.orig/libmultipath/alias.h
++++ multipath-tools-111219/libmultipath/alias.h
 @@ -1,4 +1,3 @@
 -#define BINDINGS_FILE_TIMEOUT 30
  #define BINDINGS_FILE_HEADER \
  "# Multipath bindings, Version : 1.0\n" \
  "# NOTE: this file is automatically maintained by the multipath program.\n" \
-Index: multipath-tools/libmultipath/config.c
+Index: multipath-tools-111219/libmultipath/config.c
 ===================================================================
---- multipath-tools.orig/libmultipath/config.c
-+++ multipath-tools/libmultipath/config.c
-@@ -452,6 +452,7 @@ load_config (char * file)
- 	conf->multipath_dir = set_default(DEFAULT_MULTIPATHDIR);
- 	conf->flush_on_last_del = 0;
- 	conf->attribute_flags = 0;
+--- multipath-tools-111219.orig/libmultipath/config.c
++++ multipath-tools-111219/libmultipath/config.c
+@@ -504,6 +504,7 @@ load_config (char * file)
+ 	conf->reassign_maps = DEFAULT_REASSIGN_MAPS;
+ 	conf->checkint = DEFAULT_CHECKINT;
+ 	conf->max_checkint = MAX_CHECKINT(conf->checkint);
 +	conf->find_multipaths = DEFAULT_FIND_MULTIPATHS;
  
  	/*
  	 * preload default hwtable
-@@ -476,10 +477,12 @@ load_config (char * file)
- 		}
- 	} else {
- 		condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
--		condlog(0, "A default multipath.conf file is located at");
-+		condlog(0, "A sample multipath.conf file is located at");
- 		condlog(0,
- "/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf",
- 			MULTIPATH_VERSION(VERSION_CODE));
-+		condlog(0,
-+"You can run /sbin/mpathconf to create or modify /etc/multipath.conf");
- 		conf->blist_devnode = vector_alloc();
- 		if (!conf->blist_devnode) {
- 			condlog(0, "cannot allocate blacklist\n");
-Index: multipath-tools/libmultipath/config.h
+Index: multipath-tools-111219/libmultipath/configure.c
 ===================================================================
---- multipath-tools.orig/libmultipath/config.h
-+++ multipath-tools/libmultipath/config.h
-@@ -85,6 +85,7 @@ struct config {
- 	int attribute_flags;
- 	int fast_io_fail;
- 	unsigned int dev_loss;
-+	int find_multipaths;
- 	uid_t uid;
- 	gid_t gid;
- 	mode_t mode;
-Index: multipath-tools/libmultipath/configure.c
-===================================================================
---- multipath-tools.orig/libmultipath/configure.c
-+++ multipath-tools/libmultipath/configure.c
-@@ -35,6 +35,7 @@
- #include "alias.h"
+--- multipath-tools-111219.orig/libmultipath/configure.c
++++ multipath-tools-111219/libmultipath/configure.c
+@@ -36,6 +36,7 @@
  #include "prio.h"
  #include "util.h"
+ #include "uxsock.h"
 +#include "finder.h"
  
  extern int
- setup_map (struct multipath * mpp)
-@@ -403,6 +404,8 @@ domap (struct multipath * mpp)
+ setup_map (struct multipath * mpp, char * params, int params_size)
+@@ -405,6 +406,8 @@ domap (struct multipath * mpp, char * pa
  		 * DM_DEVICE_CREATE, DM_DEVICE_RENAME, or DM_DEVICE_RELOAD
  		 * succeeded
  		 */
@@ -278,7 +249,7 @@ Index: multipath-tools/libmultipath/configure.c
  		if (!conf->daemon) {
  			/* multipath client mode */
  			dm_switchgroup(mpp->alias, mpp->bestpg);
-@@ -462,6 +465,10 @@ coalesce_paths (struct vectors * vecs, v
+@@ -492,6 +495,10 @@ coalesce_paths (struct vectors * vecs, v
  
  	memset(empty_buff, 0, WWID_SIZE);
  
@@ -289,34 +260,13 @@ Index: multipath-tools/libmultipath/configure.c
  	if (force_reload) {
  		vector_foreach_slot (pathvec, pp1, k) {
  			pp1->mpp = NULL;
-@@ -472,21 +479,32 @@ coalesce_paths (struct vectors * vecs, v
- 
- 		/* 1. if path has no unique id or wwid blacklisted */
- 		if (memcmp(empty_buff, pp1->wwid, WWID_SIZE) == 0 ||
--		    filter_path(conf, pp1) > 0)
-+		    filter_path(conf, pp1) > 0) {
-+			orphan_path(pp1);
- 			continue;
-+		}
- 
- 		/* 2. if path already coalesced */
- 		if (pp1->mpp)
- 			continue;
- 
- 		/* 3. if path has disappeared */
--		if (!pp1->size)
-+		if (!pp1->size) {
-+			orphan_path(pp1);
- 			continue;
-+		}
- 
- 		/* 4. path is out of scope */
+@@ -521,6 +528,13 @@ coalesce_paths (struct vectors * vecs, v
  		if (refwwid && strncmp(pp1->wwid, refwwid, WWID_SIZE))
  			continue;
  
 +		/* If find_multipaths was selected check if the path is valid */
 +		if (conf->find_multipaths && !refwwid &&
-+		    !should_multipath(pp1, pathvec)){
++		    !should_multipath(pp1, pathvec)) {
 +			orphan_path(pp1);
 +			continue;
 +		}
@@ -324,30 +274,30 @@ Index: multipath-tools/libmultipath/configure.c
  		/*
  		 * at this point, we know we really got a new mp
  		 */
-Index: multipath-tools/libmultipath/defaults.h
+Index: multipath-tools-111219/libmultipath/defaults.h
 ===================================================================
---- multipath-tools.orig/libmultipath/defaults.h
-+++ multipath-tools/libmultipath/defaults.h
-@@ -12,6 +12,7 @@
- #define DEFAULT_PGTIMEOUT      -PGTIMEOUT_NONE
+--- multipath-tools-111219.orig/libmultipath/defaults.h
++++ multipath-tools-111219/libmultipath/defaults.h
+@@ -15,6 +15,7 @@
  #define DEFAULT_USER_FRIENDLY_NAMES    0
  #define DEFAULT_VERBOSITY	2
+ #define DEFAULT_REASSIGN_MAPS	1
 +#define DEFAULT_FIND_MULTIPATHS 0
  
  #define DEFAULT_CHECKINT	5
  #define MAX_CHECKINT(a)		(a << 2)
-@@ -20,5 +21,6 @@
+@@ -24,5 +25,6 @@
  #define DEFAULT_SOCKET		"/var/run/multipathd.sock"
  #define DEFAULT_CONFIGFILE	"/etc/multipath.conf"
  #define DEFAULT_BINDINGS_FILE	"/etc/multipath/bindings"
 +#define DEFAULT_WWIDS_FILE	"/etc/multipath/wwids"
  
  char * set_default (char * str);
-Index: multipath-tools/libmultipath/dict.c
+Index: multipath-tools-111219/libmultipath/dict.c
 ===================================================================
---- multipath-tools.orig/libmultipath/dict.c
-+++ multipath-tools/libmultipath/dict.c
-@@ -444,6 +444,27 @@ def_flush_on_last_del_handler(vector str
+--- multipath-tools-111219.orig/libmultipath/dict.c
++++ multipath-tools-111219/libmultipath/dict.c
+@@ -544,6 +544,27 @@ def_log_checker_err_handler(vector strve
  }
  
  static int
@@ -375,7 +325,7 @@ Index: multipath-tools/libmultipath/dict.c
  names_handler(vector strvec)
  {
  	char * buff;
-@@ -2076,6 +2097,18 @@ snprint_def_flush_on_last_del (char * bu
+@@ -2365,6 +2386,18 @@ snprint_def_log_checker_err (char * buff
  }
  
  static int
@@ -393,19 +343,19 @@ Index: multipath-tools/libmultipath/dict.c
 +static int
  snprint_def_user_friendly_names (char * buff, int len, void * data)
  {
- 	if (conf->user_friendly_names == DEFAULT_USER_FRIENDLY_NAMES)
-@@ -2141,6 +2174,7 @@ init_keywords(void)
- 	install_keyword("gid", &def_gid_handler, &snprint_def_gid);
- 	install_keyword("fast_io_fail_tmo", &def_fast_io_fail_handler, &snprint_def_fast_io_fail);
+ 	if (!conf->user_friendly_names)
+@@ -2456,6 +2489,7 @@ init_keywords(void)
  	install_keyword("dev_loss_tmo", &def_dev_loss_handler, &snprint_def_dev_loss);
+ 	install_keyword("bindings_file", &bindings_file_handler, &snprint_def_bindings_file);
+ 	install_keyword("log_checker_err", &def_log_checker_err_handler, &snprint_def_log_checker_err);
 +	install_keyword("find_multipaths", &def_find_multipaths_handler, &snprint_def_find_multipaths);
  	__deprecated install_keyword("default_selector", &def_selector_handler, NULL);
  	__deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
  	__deprecated install_keyword("default_getuid_callout", &def_getuid_callout_handler, NULL);
-Index: multipath-tools/libmultipath/file.c
+Index: multipath-tools-111219/libmultipath/file.c
 ===================================================================
 --- /dev/null
-+++ multipath-tools/libmultipath/file.c
++++ multipath-tools-111219/libmultipath/file.c
 @@ -0,0 +1,178 @@
 +/*
 + * Copyright (c) 2005 Christophe Varoqui
@@ -585,10 +535,10 @@ Index: multipath-tools/libmultipath/file.c
 +	close(fd);
 +	return -1;
 +}
-Index: multipath-tools/libmultipath/file.h
+Index: multipath-tools-111219/libmultipath/file.h
 ===================================================================
 --- /dev/null
-+++ multipath-tools/libmultipath/file.h
++++ multipath-tools-111219/libmultipath/file.h
 @@ -0,0 +1,11 @@
 +/*
 + * Copyright (c) 2010 Benjamin Marzinski, Redhat
@@ -601,10 +551,10 @@ Index: multipath-tools/libmultipath/file.h
 +int open_file(char *file, int *can_write, char *header);
 +
 +#endif /* _FILE_H */
-Index: multipath-tools/libmultipath/finder.c
+Index: multipath-tools-111219/libmultipath/finder.c
 ===================================================================
 --- /dev/null
-+++ multipath-tools/libmultipath/finder.c
++++ multipath-tools-111219/libmultipath/finder.c
 @@ -0,0 +1,165 @@
 +#include <stdlib.h>
 +#include <errno.h>
@@ -771,10 +721,10 @@ Index: multipath-tools/libmultipath/finder.c
 +		condlog(4, "wwid %s already in wwids file", wwid);
 +	return 0;
 +}
-Index: multipath-tools/libmultipath/finder.h
+Index: multipath-tools-111219/libmultipath/finder.h
 ===================================================================
 --- /dev/null
-+++ multipath-tools/libmultipath/finder.h
++++ multipath-tools-111219/libmultipath/finder.h
 @@ -0,0 +1,18 @@
 +/*
 + * Copyright (c) 2010 Benjamin Marzinski, Redhat
@@ -794,11 +744,27 @@ Index: multipath-tools/libmultipath/finder.h
 +int remember_wwid(char *wwid);
 +
 +#endif /* _FINDER_H */
-Index: multipath-tools/multipath/main.c
+Index: multipath-tools-111219/multipath/main.c
 ===================================================================
---- multipath-tools.orig/multipath/main.c
-+++ multipath-tools/multipath/main.c
-@@ -307,7 +307,7 @@ configure (void)
+--- multipath-tools-111219.orig/multipath/main.c
++++ multipath-tools-111219/multipath/main.c
+@@ -53,6 +53,7 @@
+ #include <errno.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
++#include <finder.h>
+ #include "dev_t.h"
+ 
+ int logsink;
+@@ -209,6 +210,7 @@ get_dm_mpvec (vector curmp, vector pathv
+ 
+ 		if (!conf->dry_run)
+ 			reinstate_paths(mpp);
++		remember_wwid(mpp->wwid);
+ 	}
+ 	return 0;
+ }
+@@ -316,7 +318,7 @@ configure (void)
  	/*
  	 * core logic entry point
  	 */
@@ -807,365 +773,52 @@ Index: multipath-tools/multipath/main.c
  
  out:
  	if (refwwid)
-Index: multipath-tools/multipathd/main.c
+Index: multipath-tools-111219/multipathd/main.c
 ===================================================================
---- multipath-tools.orig/multipathd/main.c
-+++ multipath-tools/multipathd/main.c
-@@ -47,6 +47,7 @@
+--- multipath-tools-111219.orig/multipathd/main.c
++++ multipath-tools-111219/multipathd/main.c
+@@ -48,6 +48,7 @@
  #include <print.h>
  #include <configure.h>
  #include <prio.h>
 +#include <finder.h>
+ #include <pgpolicies.h>
+ #include <uevent.h>
  
- #include "main.h"
- #include "pidfile.h"
-@@ -397,7 +398,7 @@ ev_add_path (char * devname, struct vect
- 	 */
- 	if (memcmp(empty_buff, pp->wwid, WWID_SIZE) == 0) {
- 		condlog(0, "%s: failed to get path uid", devname);
--		return 1; /* leave path added to pathvec */
-+		goto fail; /* leave path added to pathvec */
- 	}
- 	if (filter_path(conf, pp) > 0){
- 		int i = find_slot(vecs->pathvec, (void *)pp);
-@@ -412,18 +413,23 @@ rescan:
- 		condlog(4,"%s: adopting all paths for path %s",
- 			mpp->alias, pp->dev);
- 		if (adopt_paths(vecs->pathvec, mpp))
--			return 1; /* leave path added to pathvec */
-+			goto fail; /* leave path added to pathvec */
+@@ -471,6 +472,11 @@ rescan:
+ 			return 1;
+ 		}
  
- 		verify_paths(mpp, vecs, NULL);
- 		mpp->flush_on_last_del = FLUSH_UNDEF;
- 		mpp->action = ACT_RELOAD;
- 	}
- 	else {
 +		if (conf->find_multipaths &&
 +		    !should_multipath(pp, vecs->pathvec)) {
 +			orphan_path(pp);
 +			return 0;
 +		}
  		condlog(4,"%s: creating new map", pp->dev);
- 		if ((mpp = add_map_with_path(vecs, pp, 1)))
+ 		if ((mpp = add_map_with_path(vecs, pp, 1))) {
  			mpp->action = ACT_CREATE;
- 		else
--			return 1; /* leave path added to pathvec */
-+			goto fail; /* leave path added to pathvec */
- 	}
- 
- 	/*
-@@ -432,7 +438,7 @@ rescan:
- 	if (setup_map(mpp)) {
- 		condlog(0, "%s: failed to setup map for addition of new "
- 			"path %s", mpp->alias, devname);
--		goto out;
-+		goto fail_map;
- 	}
- 	/*
- 	 * reload the map for the multipath mapped device
-@@ -450,7 +456,7 @@ rescan:
- 			goto rescan;
- 		}
- 		else
--			goto out;
-+			goto fail_map;
- 	}
- 	dm_lib_release();
- 
-@@ -458,19 +464,21 @@ rescan:
- 	 * update our state from kernel regardless of create or reload
- 	 */
- 	if (setup_multipath(vecs, mpp))
--		goto out;
-+		goto fail_map;
- 
- 	sync_map_state(mpp);
- 
- 	if (mpp->action == ACT_CREATE &&
- 	    start_waiter_thread(mpp, vecs))
--			goto out;
-+			goto fail_map;
- 
- 	condlog(2, "%s path added to devmap %s", devname, mpp->alias);
- 	return 0;
- 
--out:
-+fail_map:
- 	remove_map(mpp, vecs, 1);
-+fail:
-+	orphan_path(pp);
- 	return 1;
- }
- 
-Index: multipath-tools/libmultipath/Makefile
+Index: multipath-tools-111219/libmultipath/Makefile
 ===================================================================
---- multipath-tools.orig/libmultipath/Makefile
-+++ multipath-tools/libmultipath/Makefile
-@@ -12,7 +12,7 @@ OBJS = memory.o parser.o vector.o devmap
+--- multipath-tools-111219.orig/libmultipath/Makefile
++++ multipath-tools-111219/libmultipath/Makefile
+@@ -15,7 +15,7 @@ OBJS = memory.o parser.o vector.o devmap
         pgpolicies.o debug.o regex.o defaults.o uevent.o \
         switchgroup.o uxsock.o print.o alias.o log_pthread.o \
         log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \
 -       lock.o waiter.o
 +       lock.o waiter.o file.o finder.o
  
- LIBDM_API_FLUSH = $(shell if test -d /lib64 ; then objdump -T /lib64/libdevmapper.so* ; else objdump -T /lib/libdevmapper.so.* ; fi | grep -c dm_task_no_flush)
+ LIBDM_API_FLUSH = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_no_flush' /usr/include/libdevmapper.h)
  
-Index: multipath-tools/multipath/mpathconf
+Index: multipath-tools-111219/libmultipath/config.h
 ===================================================================
---- /dev/null
-+++ multipath-tools/multipath/mpathconf
-@@ -0,0 +1,234 @@
-+#!/bin/sh
-+#
-+# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
-+#
-+# This file is part of the device-mapper-multipath package.
-+#
-+# This copyrighted material is made available to anyone wishing to use,
-+# modify, copy, or redistribute it subject to the terms and conditions
-+# of the GNU General Public License v.2.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software Foundation,
-+# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-+
-+#
-+# Simple editting of /etc/multipath.conf
-+# This program was largely ripped off from lvmconf
-+#
-+
-+DEFAULT_CONFIGFILE="/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf"
-+CONFIGFILE="/etc/multipath.conf"
-+MULTIPATHDIR="/etc/multipath"
-+TMPFILE=/etc/multipath/.multipath.conf.tmp
-+
-+function usage
-+{
-+	echo "usage: $0 <command>"
-+	echo ""
-+	echo "Commands:"
-+	echo "Enable: --enable [--user_friendly_names <y|n>] [--find_multipaths <y|n>"
-+	echo "Disable: --disable"
-+	echo "Set user_friendly_names: --user_friendly_names <y|n>"
-+	echo "Set find_multipaths: --find_multipaths <y|n>"
-+	echo ""
-+}
-+
-+function parse_args
-+{
-+	while [ -n "$1" ]; do
-+		case $1 in
-+			--enable)
-+				ENABLE=1
-+				shift
-+				;;
-+			--disable)
-+				ENABLE=0
-+				shift
-+				;;
-+			--user_friendly_names)
-+				if [ -n "$2" ]; then
-+					FRIENDLY=$2
-+					shift 2
-+				else
-+					usage
-+					exit 1
-+				fi
-+				;;
-+			--find_multipaths)
-+				if [ -n "$2" ]; then
-+					FIND=$2
-+					shift 2
-+				else
-+					usage
-+					exit 1
-+				fi
-+				;;
-+			*)
-+				usage
-+				exit
-+		esac
-+	done
-+}
-+
-+function validate_args
-+{
-+	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" ]; then
-+		echo "ignoring extra parameters on disable"
-+		FRIENDLY=""
-+		FIND=""
-+	fi
-+	if [ -n "$FRIENDLY" ] && [ "$FRIENDLY" != "y" -a "$FRIENDLY" != "n" ]; then
-+		echo "--user_friendly_names must be either 'y' or 'n'"
-+		exit 1
-+	fi
-+	if [ -n "$FIND" ] && [ "$FIND" != "y" -a "$FIND" != "n" ]; then
-+		echo "--find_multipaths must be either 'y' or 'n'"
-+		exit 1
-+	fi
-+	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" ]; then
-+		DISPLAY=1
-+	fi
-+}
-+
-+umask 0077
-+
-+parse_args "$@"
-+
-+validate_args
-+
-+if [ ! -d "$MULTIPATHDIR" ]; then
-+	echo "/etc/multipath/ does not exist. failing"
-+	exit 1
-+fi
-+
-+rm $TMPFILE 2> /dev/null
-+if [ -f "$CONFIGFILE" ]; then
-+	cp $CONFIGFILE $TMPFILE
-+elif [ -f "$DEFAULT_CONFIGFILE" ]; then
-+	cp $DEFAULT_CONFIGFILE $TMPFILE
-+else
-+	touch $TMPFILE
-+fi
-+
-+if grep -q "^blacklist[[:space:]]*{" $TMPFILE ; then
-+	HAVE_BLACKLIST=1
-+fi
-+
-+if grep -q "^defaults[[:space:]]*{" $TMPFILE ; then
-+	HAVE_DEFAULTS=1
-+fi
-+
-+if [ "$HAVE_BLACKLIST" = "1" ]; then
-+	if sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*devnode \"\.\?\*\"" ; then
-+		HAVE_DISABLE=1
-+	elif sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[#[:space:]]*devnode \"\.\?\*\"" ; then
-+		HAVE_DISABLE=0
-+	fi
-+fi
-+
-+if [ "$HAVE_DEFAULTS" = "1" ]; then
-+	if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)" ; then
-+		HAVE_FIND=1
-+	elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)" ; then
-+		HAVE_FIND=0
-+	fi
-+	if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)" ; then
-+		HAVE_FRIENDLY=1
-+	elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)" ; then
-+		HAVE_FRIENDLY=0
-+	fi
-+fi
-+
-+if [ -n "$DISPLAY" ]; then
-+	if [ -z "$HAVE_DISABLE" -o "$HAVE_DISABLE" = 0 ]; then
-+		echo "multipath is enabled"
-+	else
-+		echo "multipath is disabled"
-+	fi
-+	if [ -z "$HAVE_FIND"  -o "$HAVE_FIND" = 0 ]; then
-+		echo "find_multipaths is disabled"
-+	else
-+		echo "find_multipaths is enabled"
-+	fi
-+	if [ -z "$HAVE_FRIENDLY" -o "$HAVE_FRIENDLY" = 0 ]; then
-+		echo "user_friendly_names is disabled"
-+	else
-+		echo "user_friendly_names is enabled"
-+	fi
-+	exit 0
-+fi
-+
-+if [ -z "$HAVE_BLACKLIST" ]; then
-+	cat >> $TMPFILE <<- _EOF_
-+
-+blacklist {
-+}
-+_EOF_
-+fi
-+
-+if [ -z "$HAVE_DEFAULTS" ]; then
-+	cat >> $TMPFILE <<- _EOF_
-+
-+defaults {
-+}
-+_EOF_
-+fi
-+
-+if [ "$ENABLE" = 1 ]; then
-+	if [ "$HAVE_DISABLE" = 1 ]; then
-+		sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*devnode \"\.\?\*\"/#	devnode ".*"/' $TMPFILE
-+	fi
-+elif [ "$ENABLE" = 0 ]; then
-+	if [ -z "$HAVE_DISABLE" ]; then
-+		sed -i '/^blacklist[[:space:]]*{/ a\
-+	devnode "*"
-+' $TMPFILE
-+	elif [ "$HAVE_DISABLE" = 0 ]; then
-+		sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*#[#[:space:]]*devnode \"\.\?\*\"/	devnode ".*"/' $TMPFILE
-+	fi
-+fi
-+
-+if [ "$FIND" = "n" ]; then
-+	if [ "$HAVE_FIND" = 1 ]; then
-+		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)/	find_multipaths no/' $TMPFILE
-+	fi
-+elif [ "$FIND" = "y" ]; then
-+	if [ -z "$HAVE_FIND" ]; then
-+		sed -i '/^defaults[[:space:]]*{/ a\
-+	find_multipaths yes
-+' $TMPFILE
-+	elif [ "$HAVE_FIND" = 0 ]; then
-+		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)/	find_multipaths yes/' $TMPFILE
-+	fi
-+fi
-+
-+if [ "$FRIENDLY" = "n" ]; then
-+	if [ "$HAVE_FRIENDLY" = 1 ]; then
-+		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)/	user_friendly_names no/' $TMPFILE
-+	fi
-+elif [ "$FRIENDLY" = "y" ]; then
-+	if [ -z "$HAVE_FRIENDLY" ]; then
-+		sed -i '/^defaults[[:space:]]*{/ a\
-+	user_friendly_names yes
-+' $TMPFILE
-+	elif [ "$HAVE_FRIENDLY" = 0 ]; then
-+		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)/	user_friendly_names yes/' $TMPFILE
-+	fi
-+fi
-+
-+if [ -f "$CONFIGFILE" ]; then
-+	cp $CONFIGFILE $CONFIGFILE.old
-+	if [ $? != 0 ]; then
-+		echo "failed to backup old config file, $CONFIGFILE not updated"
-+		exit 1
-+	fi
-+fi
-+
-+cp $TMPFILE $CONFIGFILE
-+if [ $? != 0 ]; then
-+	echo "failed to copy new config file into place, check $CONFIGFILE is still OK"
-+	exit 1
-+fi
-+
-+rm -f $TMPFILE
-Index: multipath-tools/multipath/Makefile
-===================================================================
---- multipath-tools.orig/multipath/Makefile
-+++ multipath-tools/multipath/Makefile
-@@ -21,6 +21,7 @@ $(EXEC): $(OBJS)
- install:
- 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
- 	$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
-+	$(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/
- 	$(INSTALL_PROGRAM) -d $(DESTDIR)/lib/udev/rules.d
- 	$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/lib/udev/rules.d/40-multipath.rules
- 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
-@@ -31,6 +32,7 @@ install:
- uninstall:
- 	rm $(DESTDIR)/lib/udev/rules.d/multipath.rules
- 	rm $(DESTDIR)$(bindir)/$(EXEC)
-+	rm $(DESTDIR)$(bindir)/mpathconf
- 	rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
- 	rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
- 
+--- multipath-tools-111219.orig/libmultipath/config.h
++++ multipath-tools-111219/libmultipath/config.h
+@@ -95,6 +95,7 @@ struct config {
+ 	unsigned int dev_loss;
+ 	int log_checker_err;
+ 	int allow_queueing;
++	int find_multipaths;
+ 	uid_t uid;
+ 	gid_t gid;
+ 	mode_t mode;
diff --git a/0010-RH-check-if-multipath-owns-path.patch b/0010-RH-check-if-multipath-owns-path.patch
new file mode 100644
index 0000000..36e423a
--- /dev/null
+++ b/0010-RH-check-if-multipath-owns-path.patch
@@ -0,0 +1,119 @@
+---
+ libmultipath/finder.c |    2 +-
+ libmultipath/finder.h |    1 +
+ multipath/main.c      |   35 +++++++++++++++++++++++++++++------
+ 3 files changed, 31 insertions(+), 7 deletions(-)
+
+Index: multipath-tools-111219/libmultipath/finder.c
+===================================================================
+--- multipath-tools-111219.orig/libmultipath/finder.c
++++ multipath-tools-111219/libmultipath/finder.c
+@@ -78,7 +78,7 @@ write_out_wwid(int fd, char *wwid) {
+ 	return 1;
+ }
+ 
+-static int
++int
+ check_wwids_file(char *wwid, int write_wwid)
+ {
+ 	int scan_fd, fd, can_write, found, ret;
+Index: multipath-tools-111219/libmultipath/finder.h
+===================================================================
+--- multipath-tools-111219.orig/libmultipath/finder.h
++++ multipath-tools-111219/libmultipath/finder.h
+@@ -14,5 +14,6 @@
+ 
+ int should_multipath(struct path *pp, vector pathvec);
+ int remember_wwid(char *wwid);
++int check_wwids_file(char *wwid, int write_wwid);
+ 
+ #endif /* _FINDER_H */
+Index: multipath-tools-111219/multipath/main.c
+===================================================================
+--- multipath-tools-111219.orig/multipath/main.c
++++ multipath-tools-111219/multipath/main.c
+@@ -83,7 +83,7 @@ usage (char * progname)
+ {
+ 	fprintf (stderr, VERSION_STRING);
+ 	fprintf (stderr, "Usage:\n");
+-	fprintf (stderr, "  %s [-d] [-r] [-v lvl] [-p pol] [-b fil] [-q] [dev]\n", progname);
++	fprintf (stderr, "  %s [-c] [-d] [-r] [-v lvl] [-p pol] [-b fil] [-q] [dev]\n", progname);
+ 	fprintf (stderr, "  %s -l|-ll|-f [-v lvl] [-b fil] [dev]\n", progname);
+ 	fprintf (stderr, "  %s -F [-v lvl]\n", progname);
+ 	fprintf (stderr, "  %s -t\n", progname);
+@@ -96,6 +96,7 @@ usage (char * progname)
+ 		"  -ll     show multipath topology (maximum info)\n" \
+ 		"  -f      flush a multipath device map\n" \
+ 		"  -F      flush all multipath device maps\n" \
++		"  -c      check if a device should be a path in a multipath device\n" \
+ 		"  -q      allow queue_if_no_path when multipathd is not running\n"\
+ 		"  -d      dry run, do not create or update devmaps\n" \
+ 		"  -t      dump internal hardware table\n" \
+@@ -261,9 +262,13 @@ configure (void)
+ 	 * if we have a blacklisted device parameter, exit early
+ 	 */
+ 	if (dev &&
+-	    (filter_devnode(conf->blist_devnode, conf->elist_devnode, dev) > 0))
+-			goto out;
+-
++	    (filter_devnode(conf->blist_devnode,
++			    conf->elist_devnode, dev) > 0)) {
++		if (conf->dry_run == 2)
++			printf("%s is not a valid multipath device path\n",
++			       conf->dev);
++		goto out;
++	}
+ 	/*
+ 	 * scope limiting must be translated into a wwid
+ 	 * failing the translation is fatal (by policy)
+@@ -279,6 +284,15 @@ configure (void)
+ 		if (filter_wwid(conf->blist_wwid, conf->elist_wwid,
+ 				refwwid) > 0)
+ 			goto out;
++		if (conf->dry_run == 2) {
++			if (check_wwids_file(refwwid, 0) == 0){
++				printf("%s is a valid multipath device path\n", conf->dev);
++				r = 0;
++			}
++			else
++				printf("%s is not a valid multipath device path\n", conf->dev);
++			goto out;
++		}
+ 	}
+ 
+ 	/*
+@@ -418,7 +432,7 @@ main (int argc, char *argv[])
+ 		condlog(0, "multipath tools need sysfs mounted");
+ 		exit(1);
+ 	}
+-	while ((arg = getopt(argc, argv, ":dhl::FfM:v:p:b:Brtq")) != EOF ) {
++	while ((arg = getopt(argc, argv, ":dchl::FfM:v:p:b:Brtq")) != EOF ) {
+ 		switch(arg) {
+ 		case 1: printf("optarg : %s\n",optarg);
+ 			break;
+@@ -440,8 +454,12 @@ main (int argc, char *argv[])
+ 		case 'q':
+ 			conf->allow_queueing = 1;
+ 			break;
++		case 'c':
++			conf->dry_run = 2;
++			break;
+ 		case 'd':
+-			conf->dry_run = 1;
++			if (!conf->dry_run)
++				conf->dry_run = 1;
+ 			break;
+ 		case 'f':
+ 			conf->remove = FLUSH_ONE;
+@@ -523,6 +541,11 @@ main (int argc, char *argv[])
+ 	}
+ 	dm_init();
+ 
++	if (conf->dry_run == 2 &&
++	    (!conf->dev || conf->dev_type == DEV_DEVMAP)) {
++		condlog(0, "the -c option requires a path to check");
++		goto out;
++	}
+ 	if (conf->remove == FLUSH_ONE) {
+ 		if (conf->dev_type == DEV_DEVMAP)
+ 			r = dm_flush_map(conf->dev);
diff --git a/0014-RH-add-hp_tur-checker.patch b/0011-RH-add-hp_tur-checker.patch
similarity index 58%
rename from 0014-RH-add-hp_tur-checker.patch
rename to 0011-RH-add-hp_tur-checker.patch
index 33dd43a..dadf392 100644
--- a/0014-RH-add-hp_tur-checker.patch
+++ b/0011-RH-add-hp_tur-checker.patch
@@ -1,14 +1,14 @@
 ---
  libmultipath/checkers.h        |    3 +
  libmultipath/checkers/Makefile |    4 +
- libmultipath/checkers/tur.c    |  111 +++++++++++++++++++++++++++++++++++++++++
+ libmultipath/checkers/tur.c    |  123 +++++++++++++++++++++++++++++++++++++++--
  multipath.conf.annotated       |    5 +
- 4 files changed, 121 insertions(+), 2 deletions(-)
+ 4 files changed, 128 insertions(+), 7 deletions(-)
 
-Index: multipath-tools/libmultipath/checkers.h
+Index: multipath-tools-111219/libmultipath/checkers.h
 ===================================================================
---- multipath-tools.orig/libmultipath/checkers.h
-+++ multipath-tools/libmultipath/checkers.h
+--- multipath-tools-111219.orig/libmultipath/checkers.h
++++ multipath-tools-111219/libmultipath/checkers.h
 @@ -60,6 +60,7 @@ enum path_check_state {
  
  #define DIRECTIO     "directio"
@@ -17,7 +17,7 @@ Index: multipath-tools/libmultipath/checkers.h
  #define HP_SW        "hp_sw"
  #define RDAC         "rdac"
  #define EMC_CLARIION "emc_clariion"
-@@ -91,6 +92,7 @@ enum path_check_state {
+@@ -77,6 +78,7 @@ enum path_check_state {
  #define CHECKER_MSG_LEN 256
  #define CHECKER_DEV_LEN 256
  #define LIB_CHECKER_NAMELEN 256
@@ -25,7 +25,7 @@ Index: multipath-tools/libmultipath/checkers.h
  
  struct checker {
  	struct list_head node;
-@@ -99,6 +101,7 @@ struct checker {
+@@ -88,6 +90,7 @@ struct checker {
  	int disable;
  	char name[CHECKER_NAME_LEN];
  	char message[CHECKER_MSG_LEN];       /* comm with callers */
@@ -33,10 +33,10 @@ Index: multipath-tools/libmultipath/checkers.h
  	void * context;                      /* store for persistent data */
  	void ** mpcontext;                   /* store for persistent data shared
  						multipath-wide. Use MALLOC if
-Index: multipath-tools/libmultipath/checkers/Makefile
+Index: multipath-tools-111219/libmultipath/checkers/Makefile
 ===================================================================
---- multipath-tools.orig/libmultipath/checkers/Makefile
-+++ multipath-tools/libmultipath/checkers/Makefile
+--- multipath-tools-111219.orig/libmultipath/checkers/Makefile
++++ multipath-tools-111219/libmultipath/checkers/Makefile
 @@ -8,6 +8,7 @@ LIBS= \
  	libcheckcciss_tur.so \
  	libcheckreadsector0.so \
@@ -47,7 +47,7 @@ Index: multipath-tools/libmultipath/checkers/Makefile
  	libcheckhp_sw.so \
 @@ -23,6 +24,9 @@ libcheckdirectio.so: libsg.o directio.o
  libcheck%.so: libsg.o %.o
- 	$(CC) $(SHARED_FLAGS) -o $@ $^
+ 	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^
  
 +hp_tur.o: tur.c
 +	$(CC) $(CFLAGS) -DCHECK_WWID -c -o $@ $<
@@ -55,17 +55,11 @@ Index: multipath-tools/libmultipath/checkers/Makefile
  install:
  	$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir)
  
-Index: multipath-tools/libmultipath/checkers/tur.c
+Index: multipath-tools-111219/libmultipath/checkers/tur.c
 ===================================================================
---- multipath-tools.orig/libmultipath/checkers/tur.c
-+++ multipath-tools/libmultipath/checkers/tur.c
-@@ -15,14 +15,101 @@
- 
- #include "checkers.h"
- 
-+#include "../libmultipath/debug.h"
- #include "../libmultipath/sg_include.h"
- 
+--- multipath-tools-111219.orig/libmultipath/checkers/tur.c
++++ multipath-tools-111219/libmultipath/checkers/tur.c
+@@ -24,12 +24,101 @@
  #define TUR_CMD_LEN 6
  #define HEAVY_CHECK_COUNT       10
  
@@ -73,6 +67,9 @@ Index: multipath-tools/libmultipath/checkers/tur.c
 +#define MSG_TUR_UP	"HP tur checker reports path is up"
 +#define MSG_TUR_DOWN	"HP tur checker reports path is down"
 +#define MSG_TUR_GHOST	"HP tur checker reports path is in standby state"
++#define MSG_TUR_RUNNING "HP tur checker still running"
++#define MSG_TUR_TIMEOUT "HP tur checker timed out"
++#define MSG_TUR_FAILED  "HP tur checker failed to initialize"
 +#define EVPD            0x01
 +#define PAGE_83         0x83
 +#define INQUIRY_CMD     0x12
@@ -82,11 +79,14 @@ Index: multipath-tools/libmultipath/checkers/tur.c
  #define MSG_TUR_UP	"tur checker reports path is up"
  #define MSG_TUR_DOWN	"tur checker reports path is down"
  #define MSG_TUR_GHOST	"tur checker reports path is in standby state"
+ #define MSG_TUR_RUNNING	"tur checker still running"
+ #define MSG_TUR_TIMEOUT	"tur checker timed out"
+ #define MSG_TUR_FAILED	"tur checker failed to initialize"
 +#endif
 +
 +#ifdef CHECK_WWID
 +static int
-+do_inq(struct checker * c, char * wwid)
++do_inq(int fd, unsigned int timeout, char * wwid)
 +{
 +	int ret = -1;
 +	unsigned char inq_cmd[INQUIRY_CMDLEN] =
@@ -111,9 +111,9 @@ Index: multipath-tools/libmultipath/checkers/tur.c
 +	io_hdr.dxferp = (unsigned char *)resp_buffer;
 +	io_hdr.cmdp = inq_cmd;
 +	io_hdr.sbp = sense_buffer;
-+	io_hdr.timeout = 60; // IOCTL timeout value.
++	io_hdr.timeout = timeout; // IOCTL timeout value.
 +
-+	if (ioctl(c->fd, SG_IO, &io_hdr) < 0) {
++	if (ioctl(fd, SG_IO, &io_hdr) < 0) {
 +		condlog(0, "SG_IO ioctl failed: %s", strerror(errno));
 +		return ret;
 +	}
@@ -160,57 +160,100 @@ Index: multipath-tools/libmultipath/checkers/tur.c
 +#endif
  
  struct tur_checker_context {
- 	void * dummy;
-@@ -30,6 +117,9 @@ struct tur_checker_context {
+ 	dev_t devt;
+@@ -43,6 +132,7 @@ struct tur_checker_context {
+ 	pthread_cond_t active;
+ 	pthread_spinlock_t hldr_lock;
+ 	int holders;
++	char wwid[WWID_SIZE];
+ 	char message[CHECKER_MSG_LEN];
+ };
  
- int libcheck_init (struct checker * c)
- {
-+#ifdef CHECK_WWID
-+	memset(c->wwid, 0, WWID_SIZE);
-+#endif
- 	return 0;
- }
+@@ -100,12 +190,15 @@ void libcheck_free (struct checker * c)
+ #define TUR_MSG(msg, fmt, args...) snprintf(msg, CHECKER_MSG_LEN, fmt, ##args);
  
-@@ -45,6 +135,9 @@ libcheck_check (struct checker * c)
+ int
+-tur_check(int fd, unsigned int timeout, char *msg)
++tur_check (int fd, unsigned int timeout, char *msg, char *wwid)
+ {
+ 	struct sg_io_hdr io_hdr;
  	unsigned char turCmdBlk[TUR_CMD_LEN] = { 0x00, 0, 0, 0, 0, 0 };
  	unsigned char sense_buffer[32];
  	int retry_tur = 5;
 +#ifdef CHECK_WWID
-+	char wwid[WWID_SIZE];
++	char new_wwid[WWID_SIZE];
 +#endif
  
   retry:
  	memset(&io_hdr, 0, sizeof (struct sg_io_hdr));
-@@ -110,6 +203,24 @@ libcheck_check (struct checker * c)
- 		MSG(c, MSG_TUR_DOWN);
+@@ -179,6 +272,24 @@ tur_check(int fd, unsigned int timeout,
+ 		TUR_MSG(msg, MSG_TUR_DOWN);
  		return PATH_DOWN;
  	}
 +#ifdef CHECK_WWID
-+	if (!do_inq(c, wwid)) {
++	if (!do_inq(fd, timeout, new_wwid)) {
 +
-+		if(!strcmp(c->wwid, "\0")) {
-+			strcpy(c->wwid, wwid);
++		if(!strcmp(wwid, "\0")) {
++			strcpy(wwid, new_wwid);
 +			goto up;
 +		}
 +
-+		if (strcmp(c->wwid , wwid)) {
++		if (strcmp(wwid , new_wwid)) {
 +			condlog(0,
 +				"hp_tur: Lun collided. new_wwid %s old_wwid %s",
-+				wwid, c->wwid);
-+			MSG(c, MSG_TUR_DOWN);
++				new_wwid, wwid);
++			TUR_MSG(msg, MSG_TUR_DOWN);
 +			return PATH_DOWN;
 +		}
 +	}
 +up:
 +#endif
- 	MSG(c, MSG_TUR_UP);
+ 	TUR_MSG(msg, MSG_TUR_UP);
  	return PATH_UP;
  }
-Index: multipath-tools/multipath.conf.annotated
+@@ -215,7 +326,7 @@ void *tur_thread(void *ctx)
+ 	ct->state = PATH_PENDING;
+ 	pthread_mutex_unlock(&ct->lock);
+ 
+-	state = tur_check(ct->fd, ct->timeout, ct->message);
++	state = tur_check(ct->fd, ct->timeout, ct->message, ct->wwid);
+ 
+ 	/* TUR checker done */
+ 	pthread_mutex_lock(&ct->lock);
+@@ -275,7 +386,7 @@ libcheck_check (struct checker * c)
+ 		ct->devt = sb.st_rdev;
+ 
+ 	if (c->sync)
+-		return tur_check(c->fd, c->timeout, c->message);
++		return tur_check(c->fd, c->timeout, c->message, ct->wwid);
+ 
+ 	/*
+ 	 * Async mode
+@@ -319,7 +430,8 @@ libcheck_check (struct checker * c)
+ 			pthread_mutex_unlock(&ct->lock);
+ 			condlog(3, "%d:%d: tur thread not responding, "
+ 				"using sync mode", TUR_DEVT(ct));
+-			return tur_check(c->fd, c->timeout, c->message);
++			return tur_check(c->fd, c->timeout, c->message,
++					 ct->wwid);
+ 		}
+ 		/* Start new TUR checker */
+ 		ct->state = PATH_UNCHECKED;
+@@ -337,7 +449,8 @@ libcheck_check (struct checker * c)
+ 			ct->holders--;
+ 			condlog(3, "%d:%d: failed to start tur thread, using"
+ 				" sync mode", TUR_DEVT(ct));
+-			return tur_check(c->fd, c->timeout, c->message);
++			return tur_check(c->fd, c->timeout, c->message,
++					 ct->wwid);
+ 		}
+ 		pthread_attr_destroy(&attr);
+ 		tur_timeout(&tsp);
+Index: multipath-tools-111219/multipath.conf.annotated
 ===================================================================
---- multipath-tools.orig/multipath.conf.annotated
-+++ multipath-tools/multipath.conf.annotated
-@@ -86,7 +86,8 @@
+--- multipath-tools-111219.orig/multipath.conf.annotated
++++ multipath-tools-111219/multipath.conf.annotated
+@@ -96,7 +96,8 @@
  #	# name    : path_checker, checker
  #	# scope   : multipath & multipathd
  #	# desc    : the default method used to determine the paths' state
@@ -220,8 +263,8 @@ Index: multipath-tools/multipath.conf.annotated
  #	# default : directio
  #	#
  #	path_checker	directio
-@@ -456,7 +457,7 @@
- #		# scope   : multipathd
+@@ -493,7 +494,7 @@
+ #		# scope   : multipathd & multipathd
  #		# desc    : path checking alorithm to use to check path state
  #		# values  : readsector0|tur|emc_clariion|hp_sw|directio|rdac|
 -#		#           cciss_tur
diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec
index 275cb4e..cffd86a 100644
--- a/device-mapper-multipath.spec
+++ b/device-mapper-multipath.spec
@@ -1,122 +1,24 @@
 Summary: Tools to manage multipath devices using device-mapper
 Name: device-mapper-multipath
 Version: 0.4.9
-Release: 20%{?dist}
+Release: 21%{?dist}
 License: GPL+
 Group: System Environment/Base
 URL: http://christophe.varoqui.free.fr/
 
-Source0: multipath-tools-091027.tar.gz
+Source0: multipath-tools-120123.tgz
 Source1: multipath.conf
-# patch that should go upstream
-Patch1: 0001-for-upstream-add-tpg_pref-prioritizer.patch
-Patch2: 0002-for-upstream-add-tmo-config-options.patch
-Patch3: 0003-for-upstream-default-configs.patch
-# local patches
-Patch1001: 0001-RH-queue-without-daemon.patch
-Patch1002: 0002-RH-path-checker.patch
-Patch1003: 0003-RH-root-init-script.patch
-Patch1004: 0004-RH-fix-kpartx.patch
-Patch1005: 0005-RH-cciss_id.patch
-Patch1006: 0006-RH-move-bindings.patch
-Patch1007: 0007-RH-do-not-remove.patch
-Patch1008: 0008-RH-Make-build-system-RH-Fedora-friendly.patch
-Patch1009: 0009-RH-multipathd-blacklist-all-by-default.patch
-Patch1010: 0010-RH-multipath-rules-udev-changes.patch
-Patch1011: 0011-RH-fix-init-script-LSB-headers.patch
-Patch1012: 0012-RH-udev-sync-support.patch
-Patch1013: 0013-RH-add-weighted_prio-prioritizer.patch
-Patch1014: 0014-RH-add-hp_tur-checker.patch
-Patch1015: 0015-RH-add-multipathd-count-paths-cmd.patch
-Patch1016: 0016-RHBZ-554561-fix-init-error-msg.patch
-Patch1017: 0017-RHBZ-554592-man-page-note.patch
-Patch1018: 0018-RHBZ-554596-SUN-6540-config.patch
-Patch1019: 0019-RHBZ-554598-fix-multipath-locking.patch
-Patch1020: 0020-RHBZ-554605-fix-manual-failover.patch
-Patch1021: 0021-RHBZ-548874-add-find-multipaths.patch
-Patch1022: 0022-RHBZ-557845-RHEL5-style-partitions.patch
-Patch1023: 0023-RHBZ-557810-emc-invista-config.patch
-Patch1024: 0024-RHBZ-565933-checker-timeout.patch
-Patch1025: 0025-RHBZ-508827-update-multipathd-manpage.patch
-Patch1026: 0026-RHBZ-549636-default-path-selector.patch
-Patch1027: 0027-RHBZ-509443-enhance-show-config.patch
-Patch1028: 0028-RHBZ-452617-add-revision-parameter.patch
-Patch1029: 0029-RHBZ-567219-recalculate-pgs-in-checkerloop.patch
-Patch1030: 0030-RHBZ-558636-check-if-multipath-owns-path.patch
-Patch1031: 0031-RHBZ-570546-display-avg-pg-prio.patch
-Patch1032: 0032-RHBZ-575767-ontap_prio.patch
-Patch1033: 0033-RHBZ-573715-eurologic-config.patch
-Patch1034: 0034-RHBZ-579575-add-q-multipath-option.patch
-Patch1035: 0035-RHBZ-467709-add-followover.patch
-Patch1036: 0036-RH-clear-messages.patch
-Patch1037: 0037-RH-adopt-paths.patch
-Patch1038: 0038-RHBZ-587201-IBM-SGI.patch
-Patch1039: 0039-RHBZ-589153-manpage-update.patch
-Patch1040: 0040-RHBZ-587695-add-checker-msg-alias.patch
-Patch1041: 0041-RHBZ-587695-add-rdac-message.patch
-Patch1042: 0042-RHBZ-590038-fix-fast-io-fail-tmo.patch
-Patch1043: 0043-RHBZ-590028-close-sysfs_attr_fd.patch
-Patch1044: 0044-RHBZ-591940-dont-clear-daemon.patch
-Patch1045: 0045-RHBZ-593379-dont-add-unknown-paths.patch
-Patch1046: 0046-RHBZ-593426-move-adopt-path.patch
-Patch1047: 0047-RHBZ-591608-only-switch-pgs-once.patch
-Patch1048: 0048-RHBZ-592494-fix-user-configs.patch
-Patch1049: 0049-RHBZ-591644-enhance-mpathconf.patch
-Patch1050: 0050-RHBZ-595400-fix-checker-tmo.patch
-Patch1051: 0051-RHBZ-596156-mpathconf-man-page.patch
-Patch1052: 0052-RHBZ-601247-fix-path-adoption.patch
-Patch1053: 0053-RHBZ-596323-remember_more_wwids.patch
-Patch1054: 0054-RHBZ-596319-rules-cleanup.patch
-Patch1055: 0055-RHBZ-602257-update-on-show-topology.patch
-Patch1056: 0056-RHBZ-603812-better-type-check.patch
-Patch1057: 0057-RHBZ-607869-fix-resize.patch
-Patch1058: 0058-RHBZ-601665-assemble-features.patch
-Patch1059: 0059-RHBZ-607874-handle-offlined-paths.patch
-Patch1060: 0060-RHBZ-606420-fix-remove-map.patch
-Patch1061: 0061-RHBZ-620479-find-rport.patch
-Patch1062: 0062-RHBZ-592998-hpsc-config.patch
-Patch1063: 0063-RHBZ-595719-udev_link_priority.patch
-Patch1064: 0064-RHBZ-612173-fix-reverse-lookup.patch
-Patch1065: 0065-RHBZ-635088-update-priority.patch
-Patch1066: 0066-RHBZ-636071-mpathconf-variable_names.patch
-Patch1067: 0067-RHBZ-622569-symmetrix-config.patch
-Patch1068: 0068-RHBZ-632734-nvdisk-config.patch
-Patch1069: 0069-RHBZ-636246-hp-open-config.patch
-Patch1070: 0070-RHBZ-639037-hitachi-open-config.patch
-Patch1071: 0071-RHBZ-611779-fix-whitespace-crash.patch
-Patch1072: 0072-RHBZ-651389-change-scsi-tmo-order.patch
-Patch1073: 0073-RHBZ-650664-clarify-error-msg.patch
-Patch1074: 0074-RHBZ-602883-dont-print-change.patch
-Patch1075: 0075-RHBZ-576919-log-checker-err.patch
-Patch1076: 0076-RHBZ-599690-update-multipath-conf.patch
-Patch1077: 0077-RHBZ-622608-nvdisk-config.patch
-Patch1078: 0078-RHBZ-628095-config-warnings.patch
-Patch1079: 0079-RHBZ-650797-display-iscsi-tgt-name.patch
-Patch1080: 0080-RHBZ-662731-fix-no-config-value-segfault.patch
-Patch1081: 0081-RHBZ-623644-fix-sysfs-caching.patch
-Patch1083: 0083-RHBZ-636213-633643-new-configs.patch
-Patch1084: 0084-RHBZ-644111-read-only-bindings.patch
-Patch1085: 0085-RHBZ-645605-fix-offline-check.patch
-Patch1086: 0086-RHBZ-681144-sysfs-device-cleanup.patch
-Patch1087: 0087-RHBZ-680480-skip-if-no-sysdev.patch
-Patch1088: 0088-RHBZ-693524-fix-prio-segfault.patch
-Patch1089: 0089-RHBZ-694602-RSSM-config.patch
-Patch1090: 0090-RHBZ-700169-fix-nr-active.patch
-Patch1091: 0091-RHBZ-699577-manpage-clarification.patch
-Patch1092: 0092-RHBZ-689504-rdac-retry.patch
-Patch1093: 0093-RHBZ-677449-dont-remove-map-on-enomem.patch
-Patch1094: 0094-RHBZ-707560-check-return-value.patch
-Patch1095: 0095-RHBZ-678673-no-path-groups.patch
-Patch1096: 0096-RHBZ-683616-ioship-support.patch
-Patch1097: 0097-RHBZ-697386-fix-shutdown-crash.patch
-Patch1098: 0098-RHBZ-706555-dont-update-pgs-in-manual.patch
-Patch1099: 0099-RHBZ-705854-warn-on-bad-dev-loss-tmo.patch
-Patch1100: 0100-RHBZ-710478-deprecate-uid-gid-mode.patch
-Patch1101: 0101-RHBZ-631009-disable-udev-disk-rules-on-reload.patch
-Patch1102: 0102-RHBZ-690828-systemd-unit-file.patch
-Patch1103: 0103-add-disable-sync-option.patch
-Patch1104: 0104-RHBZ-737989-systemd-unit-fix.patch
-Patch1105: 0105-fix-oom-adj.patch
+Patch0001: 0001-RH-fix-async-tur.patch
+Patch0002: 0002-RH-dont_start_with_no_config.patch
+Patch0003: 0003-RH-multipath.rules.patch
+Patch0004: 0004-RH-update-init-script.patch
+Patch0005: 0005-RH-cciss_id.patch
+Patch0006: 0006-RH-Make-build-system-RH-Fedora-friendly.patch
+Patch0007: 0007-RH-multipathd-blacklist-all-by-default.patch
+Patch0008: 0008-RH-add-mpathconf.patch
+Patch0009: 0009-RH-add-find-multipaths.patch
+Patch0010: 0010-RH-check-if-multipath-owns-path.patch
+Patch0011: 0011-RH-add-hp_tur-checker.patch
 
 # runtime
 Requires: %{name}-libs = %{version}-%{release}
@@ -168,114 +70,18 @@ Group: System Environment/Base
 kpartx manages partition creation and removal for device-mapper devices.
 
 %prep
-%setup -q -n multipath-tools
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch1001 -p1
-%patch1002 -p1
-%patch1003 -p1
-%patch1004 -p1
-%patch1005 -p1
-%patch1006 -p1
-%patch1007 -p1
-%patch1008 -p1
-%patch1009 -p1
-%patch1010 -p1
-%patch1011 -p1
-%patch1012 -p1
-%patch1013 -p1
-%patch1014 -p1
-%patch1015 -p1
-%patch1016 -p1
-%patch1017 -p1
-%patch1018 -p1
-%patch1019 -p1
-%patch1020 -p1
-%patch1021 -p1
-%patch1022 -p1
-%patch1023 -p1
-%patch1024 -p1
-%patch1025 -p1
-%patch1026 -p1
-%patch1027 -p1
-%patch1028 -p1
-%patch1029 -p1
-%patch1030 -p1
-%patch1031 -p1
-%patch1032 -p1
-%patch1033 -p1
-%patch1034 -p1
-%patch1035 -p1
-%patch1036 -p1
-%patch1037 -p1
-%patch1038 -p1
-%patch1039 -p1
-%patch1040 -p1
-%patch1041 -p1
-%patch1042 -p1
-%patch1043 -p1
-%patch1044 -p1
-%patch1045 -p1
-%patch1046 -p1
-%patch1047 -p1
-%patch1048 -p1
-%patch1049 -p1
-%patch1050 -p1
-%patch1051 -p1
-%patch1052 -p1
-%patch1053 -p1
-%patch1054 -p1
-%patch1055 -p1
-%patch1056 -p1
-%patch1057 -p1
-%patch1058 -p1
-%patch1059 -p1
-%patch1060 -p1
-%patch1061 -p1
-%patch1062 -p1
-%patch1063 -p1
-%patch1064 -p1
-%patch1065 -p1
-%patch1066 -p1
-%patch1067 -p1
-%patch1068 -p1
-%patch1069 -p1
-%patch1070 -p1
-%patch1071 -p1
-%patch1072 -p1
-%patch1073 -p1
-%patch1074 -p1
-%patch1075 -p1
-%patch1076 -p1
-%patch1077 -p1
-%patch1078 -p1
-%patch1079 -p1
-%patch1080 -p1
-%patch1081 -p1
-%patch1083 -p1
-%patch1084 -p1
-%patch1085 -p1
-%patch1086 -p1
-%patch1087 -p1
-%patch1088 -p1
-%patch1089 -p1
-%patch1090 -p1
-%patch1091 -p1
-%patch1092 -p1
-%patch1093 -p1
-%patch1094 -p1
-%patch1095 -p1
-%patch1096 -p1
-%patch1097 -p1
-%patch1098 -p1
-%patch1099 -p1
-%patch1100 -p1
-%patch1101 -p1
-%patch1102 -p1
-%patch1103 -p1
-%patch1104 -p1
-%patch1105 -p1
+%setup -q -n multipath-tools-120123
+%patch0001 -p1
+%patch0002 -p1
+%patch0003 -p1
+%patch0004 -p1
+%patch0005 -p1
+%patch0006 -p1
+%patch0007 -p1
+%patch0008 -p1
+%patch0009 -p1
+%patch0010 -p1
+%patch0011 -p1
 cp %{SOURCE1} .
 
 %build
@@ -349,6 +155,7 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
 %defattr(-,root,root,-)
 %doc AUTHOR COPYING
 %{_libdir}/libmultipath.so
+%{_libdir}/libmultipath.so.*
 %dir %{_libmpathdir}
 %{_libmpathdir}/*
 
@@ -365,6 +172,21 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
 %{_mandir}/man8/kpartx.8.gz
 
 %changelog
+* Tue Jan 24 2012 Benjamin Marzinski <bmarzins at redhat.com> 0.4.9-21
+- Updated to latest upstream 0.4.9 code : multipath-tools-120123.tgz
+  (git commit id: 63704387009443bdb37d9deaaafa9ab121d45bfb)
+- Add 0001-RH-fix-async-tur.patch
+- Add 0002-RH-dont_start_with_no_config.patch
+- Add 0003-RH-multipath.rules.patch
+- Add 0004-RH-update-init-script.patch
+- Add 0005-RH-cciss_id.patch
+- Add 0006-RH-Make-build-system-RH-Fedora-friendly.patch
+- Add 0007-RH-multipathd-blacklist-all-by-default.patch
+- Add 0008-RH-add-mpathconf.patch
+- Add 0009-RH-add-find-multipaths.patch
+- Add 0010-RH-check-if-multipath-owns-path.patch
+- Add 0011-RH-add-hp_tur-checker.patch
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.9-20
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
diff --git a/sources b/sources
index b2bd1f5..2329d3d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-af9cc98e278066cabfa2f47e8852f506  multipath-tools-091027.tar.gz
+7cea74ff9f3b494d1cba6884617d08fd  multipath-tools-120123.tgz


More information about the scm-commits mailing list