rpms/device-mapper-multipath/devel 0001-RH-queue-without-daemon.patch, NONE, 1.1 0001-for-upstream-add-tpg_pref-prioritizer.patch, NONE, 1.1 0002-RH-path-checker.patch, NONE, 1.1 0003-RH-root-init-script.patch, NONE, 1.1 0004-RH-fix-kpartx.patch, NONE, 1.1 0005-RH-cciss_id.patch, NONE, 1.1 0006-RH-move-bindings.patch, NONE, 1.1 0007-RH-do-not-remove.patch, NONE, 1.1 0008-RH-Make-build-system-RH-Fedora-friendly.patch, NONE, 1.1 0009-RH-multipathd-blacklist-all-by-default.patch, NONE, 1.1 0010-RH-multipath-rules-udev-changes.patch, NONE, 1.1 0011-RH-fix-init-script-LSB-headers.patch, NONE, 1.1 0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch, NONE, 1.1 import.log, NONE, 1.1 multipath.conf.redhat, NONE, 1.1 .cvsignore, 1.18, 1.19 device-mapper-multipath.spec, 1.62, 1.63 sources, 1.19, 1.20 bindings_file.patch, 1.1, NONE cciss_id.patch, 1.2, NONE directio_message_cleanup.patch, 1.3, NONE dont_remove.patch, 1.1, NONE fix_kpartx.patch, 1.2, NONE fix_missed_uevs.patch, 1.1, NONE log_all_messages.patch, 1.1, NONE move_bindings.patch, 1.1, NONE mpath_wait.patch, 1.3, NONE multipath_rules.patch, 1.4, NONE path_checker.patch, 1.1, NONE queue_without_daemon.patch, 1.1, NONE redhatification.patch, 1.5, NONE root_init_script.patch, 1.1, NONE select_lib.patch, 1.1, NONE stop_warnings.patch, 1.1, NONE udev_change.patch, 1.1, NONE uninstall.patch, 1.1, NONE
Fabio M. Di Nitto
fabbione at fedoraproject.org
Tue Oct 27 09:59:00 UTC 2009
- Previous message (by thread): rpms/eclipse-mylyn/devel fetch-mylyn.sh, 1.11, 1.12 eclipse-mylyn.spec, 1.41, 1.42 .cvsignore, 1.10, 1.11 eclipse-mylyn-wikitext_builddoc.patch, 1.2, 1.3 eclipse-mylyn-addfedoracustomizations.patch, 1.9, 1.10 sources, 1.13, 1.14
- Next message (by thread): rpms/ocaml/devel ocaml.spec,1.61,1.62
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: fabbione
Update of /cvs/pkgs/rpms/device-mapper-multipath/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5567/devel
Modified Files:
.cvsignore device-mapper-multipath.spec sources
Added Files:
0001-RH-queue-without-daemon.patch
0001-for-upstream-add-tpg_pref-prioritizer.patch
0002-RH-path-checker.patch 0003-RH-root-init-script.patch
0004-RH-fix-kpartx.patch 0005-RH-cciss_id.patch
0006-RH-move-bindings.patch 0007-RH-do-not-remove.patch
0008-RH-Make-build-system-RH-Fedora-friendly.patch
0009-RH-multipathd-blacklist-all-by-default.patch
0010-RH-multipath-rules-udev-changes.patch
0011-RH-fix-init-script-LSB-headers.patch
0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch
import.log multipath.conf.redhat
Removed Files:
bindings_file.patch cciss_id.patch
directio_message_cleanup.patch dont_remove.patch
fix_kpartx.patch fix_missed_uevs.patch log_all_messages.patch
move_bindings.patch mpath_wait.patch multipath_rules.patch
path_checker.patch queue_without_daemon.patch
redhatification.patch root_init_script.patch select_lib.patch
stop_warnings.patch udev_change.patch uninstall.patch
Log Message:
Revamp package a bit
0001-RH-queue-without-daemon.patch:
libmultipath/config.h | 1 +
libmultipath/dict.c | 35 +++++++++++++++++++++++++++++++++++
libmultipath/structs.h | 6 ++++++
multipath.conf.annotated | 9 +++++++++
multipath.conf.synthetic | 1 +
multipathd/main.c | 6 +++++-
6 files changed, 57 insertions(+), 1 deletion(-)
--- NEW FILE 0001-RH-queue-without-daemon.patch ---
>From 8191fb07d8212e29ad44370abb60e174e1c34bb5 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue, 13 Oct 2009 08:15:15 +0200
Subject: [PATCH 01/12] RH: queue without daemon
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 50a728c... 86b1320... M libmultipath/config.h
:100644 100644 ee4de68... 7888e8e... M libmultipath/dict.c
:100644 100644 afd1246... 2e7a0d1... M libmultipath/structs.h
:100644 100644 c222da4... 9afa615... M multipath.conf.annotated
:100644 100644 3e0fd6e... 44d1329... M multipath.conf.synthetic
:100644 100644 41a9bd0... 90de6df... M multipathd/main.c
libmultipath/config.h | 1 +
libmultipath/dict.c | 35 +++++++++++++++++++++++++++++++++++
libmultipath/structs.h | 6 ++++++
multipath.conf.annotated | 9 +++++++++
multipath.conf.synthetic | 1 +
multipathd/main.c | 5 +++++
6 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/libmultipath/config.h b/libmultipath/config.h
index 50a728c..86b1320 100644
--- a/libmultipath/config.h
+++ b/libmultipath/config.h
@@ -72,6 +72,7 @@ struct config {
int pg_timeout;
int max_fds;
int force_reload;
+ int queue_without_daemon;
int daemon;
int flush_on_last_del;
int attribute_flags;
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index ee4de68..7888e8e 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -333,6 +333,28 @@ def_no_path_retry_handler(vector strvec)
}
static int
+def_queue_without_daemon(vector strvec)
+{
+ char * buff;
+
+ buff = set_value(strvec);
+ if (!buff)
+ return 1;
+
+ if (!strncmp(buff, "off", 3) || !strncmp(buff, "no", 2) ||
+ !strncmp(buff, "0", 1))
+ conf->queue_without_daemon = QUE_NO_DAEMON_OFF;
+ else if (!strncmp(buff, "on", 2) || !strncmp(buff, "yes", 3) ||
+ !strncmp(buff, "1", 1))
+ conf->queue_without_daemon = QUE_NO_DAEMON_ON;
+ else
+ conf->queue_without_daemon = QUE_NO_DAEMON_UNDEF;
+
+ free(buff);
+ return 0;
+}
+
+static int
def_pg_timeout_handler(vector strvec)
{
int pg_timeout;
@@ -1846,6 +1868,18 @@ snprint_def_no_path_retry (char * buff, int len, void * data)
}
static int
+snprint_def_queue_without_daemon (char * buff, int len, void * data)
+{
+ switch (conf->queue_without_daemon) {
+ case QUE_NO_DAEMON_OFF:
+ return snprintf(buff, len, "no");
+ case QUE_NO_DAEMON_ON:
+ return snprintf(buff, len, "yes");
+ }
+ return 0;
+}
+
+static int
snprint_def_pg_timeout (char * buff, int len, void * data)
{
if (conf->pg_timeout == DEFAULT_PGTIMEOUT)
@@ -1931,6 +1965,7 @@ init_keywords(void)
install_keyword("max_fds", &max_fds_handler, &snprint_max_fds);
install_keyword("rr_weight", &def_weight_handler, &snprint_def_rr_weight);
install_keyword("no_path_retry", &def_no_path_retry_handler, &snprint_def_no_path_retry);
+ install_keyword("queue_without_daemon", &def_queue_without_daemon, &snprint_def_queue_without_daemon);
install_keyword("pg_timeout", &def_pg_timeout_handler, &snprint_def_pg_timeout);
install_keyword("flush_on_last_del", &def_flush_on_last_del_handler, &snprint_def_flush_on_last_del);
install_keyword("user_friendly_names", &names_handler, &snprint_def_user_friendly_names);
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
index afd1246..2e7a0d1 100644
--- a/libmultipath/structs.h
+++ b/libmultipath/structs.h
@@ -63,6 +63,12 @@ enum pgstates {
PGSTATE_ACTIVE
};
+enum queue_without_daemon_states {
+ QUE_NO_DAEMON_UNDEF,
+ QUE_NO_DAEMON_OFF,
+ QUE_NO_DAEMON_ON,
+};
+
enum pgtimeouts {
PGTIMEOUT_UNDEF,
PGTIMEOUT_NONE
diff --git a/multipath.conf.annotated b/multipath.conf.annotated
index c222da4..9afa615 100644
--- a/multipath.conf.annotated
+++ b/multipath.conf.annotated
@@ -153,6 +153,15 @@
# no_path_retry queue
#
# #
+# # name : queue_without_daemon
+# # scope : multipathd
+# # desc : If set to "no", multipathd will disable queueing for all
+# # devices when it is shut down.
+# # values : yes|no
+# # default : yes
+# queue_without_daemon no
+#
+# #
# # name : user_friendly_names
# # scope : multipath
# # desc : If set to "yes", using the bindings file
diff --git a/multipath.conf.synthetic b/multipath.conf.synthetic
index 3e0fd6e..44d1329 100644
--- a/multipath.conf.synthetic
+++ b/multipath.conf.synthetic
@@ -16,6 +16,7 @@
# rr_weight priorities
# failback immediate
# no_path_retry fail
+# queue_without_daemon no
# user_friendly_names no
# mode 644
# uid 0
diff --git a/multipathd/main.c b/multipathd/main.c
index 41a9bd0..90de6df 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1334,6 +1334,8 @@ child (void * param)
pthread_t check_thr, uevent_thr, uxlsnr_thr;
pthread_attr_t log_attr, misc_attr;
struct vectors * vecs;
+ struct multipath * mpp;
+ int i;
mlockall(MCL_CURRENT | MCL_FUTURE);
@@ -1422,6 +1424,9 @@ child (void * param)
*/
block_signal(SIGHUP, NULL);
lock(vecs->lock);
+ if (conf->queue_without_daemon == QUE_NO_DAEMON_OFF)
+ vector_foreach_slot(vecs->mpvec, mpp, i)
+ dm_queue_if_no_path(mpp->alias, 0);
remove_maps_and_stop_waiters(vecs);
free_pathvec(vecs->pathvec, FREE_PATHS);
--
1.6.5.1
0001-for-upstream-add-tpg_pref-prioritizer.patch:
prio.h | 1 +
prioritizers/Makefile | 10 ++++++++++
prioritizers/alua.c | 7 +++++++
prioritizers/alua_rtpg.c | 4 ++++
prioritizers/alua_spc3.h | 7 ++++++-
5 files changed, 28 insertions(+), 1 deletion(-)
--- NEW FILE 0001-for-upstream-add-tpg_pref-prioritizer.patch ---
>From faf6bfc96b98562626e0ea12aecb582032ff4cab Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Mon, 19 Oct 2009 07:02:02 +0200
Subject: [PATCH 1/1] for-upstream: add tpg_pref prioritizer
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 fc9277f... 1f40859... M libmultipath/prio.h
:100644 100644 949a60a... 5021c04... M libmultipath/prioritizers/Makefile
:100644 100644 0048a44... 22513ab... M libmultipath/prioritizers/alua.c
:100644 100644 0531052... cd9c29d... M libmultipath/prioritizers/alua_rtpg.c
:100644 100644 bddbbdd... daf95a6... M libmultipath/prioritizers/alua_spc3.h
libmultipath/prio.h | 1 +
libmultipath/prioritizers/Makefile | 10 ++++++++++
libmultipath/prioritizers/alua.c | 7 +++++++
libmultipath/prioritizers/alua_rtpg.c | 4 ++++
libmultipath/prioritizers/alua_spc3.h | 6 ++++++
5 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/libmultipath/prio.h b/libmultipath/prio.h
index fc9277f..1f40859 100644
--- a/libmultipath/prio.h
+++ b/libmultipath/prio.h
@@ -16,6 +16,7 @@
* Known prioritizers for use in hwtable.c
*/
#define PRIO_ALUA "alua"
+#define PRIO_TPG_PREF "tpg_pref"
#define PRIO_CONST "const"
#define PRIO_EMC "emc"
#define PRIO_HDS "hds"
diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile
index 949a60a..5021c04 100644
--- a/libmultipath/prioritizers/Makefile
+++ b/libmultipath/prioritizers/Makefile
@@ -11,6 +11,7 @@ LIBS = \
libprioemc.so \
libpriordac.so \
libprioalua.so \
+ libpriotpg_pref.so \
libprionetapp.so \
libpriohds.so
@@ -21,9 +22,18 @@ all: $(LIBS)
libprioalua.so: alua.o alua_rtpg.o
$(CC) $(SHARED_FLAGS) -o $@ $^
+libpriotpg_pref.so: pref.o pref_rtpg.o
+ $(CC) $(SHARED_FLAGS) -o $@ $^
+
libprio%.so: %.o
$(CC) $(SHARED_FLAGS) -o $@ $^
+pref.o: alua.c
+ $(CC) $(CFLAGS) -DTPG_PREF -c -o $@ $<
+
+pref_rtpg.o: alua_rtpg.c
+ $(CC) $(CFLAGS) -DTPG_PREF -c -o $@ $<
+
install: $(LIBS)
$(INSTALL_PROGRAM) -m 755 libprio*.so $(DESTDIR)$(libdir)
diff --git a/libmultipath/prioritizers/alua.c b/libmultipath/prioritizers/alua.c
index 0048a44..22513ab 100644
--- a/libmultipath/prioritizers/alua.c
+++ b/libmultipath/prioritizers/alua.c
@@ -28,6 +28,12 @@
int
get_alua_info(int fd)
{
+#ifdef TPG_PREF
+ char * aas_string[] = {
+ [AAS_OPTIMIZED] = "preferred",
+ [AAS_STANDBY] = "non-preferred",
+ };
+#else
char * aas_string[] = {
[AAS_OPTIMIZED] = "active/optimized",
[AAS_NON_OPTIMIZED] = "active/non-optimized",
@@ -35,6 +41,7 @@ get_alua_info(int fd)
[AAS_UNAVAILABLE] = "unavailable",
[AAS_TRANSITIONING] = "transitioning between states",
};
+#endif
int rc;
int tpg;
diff --git a/libmultipath/prioritizers/alua_rtpg.c b/libmultipath/prioritizers/alua_rtpg.c
index 0531052..cd9c29d 100644
--- a/libmultipath/prioritizers/alua_rtpg.c
+++ b/libmultipath/prioritizers/alua_rtpg.c
@@ -293,7 +293,11 @@ get_asymmetric_access_state(int fd, unsigned int tpg)
"group.\n");
} else {
PRINT_DEBUG("pref=%i\n", dscr->b0);
+#ifdef TPG_PREF
+ rc = rtpg_tpg_dscr_get_pref(dscr);
+#else
rc = rtpg_tpg_dscr_get_aas(dscr);
+#endif
}
}
}
diff --git a/libmultipath/prioritizers/alua_spc3.h b/libmultipath/prioritizers/alua_spc3.h
index bddbbdd..daf95a6 100644
--- a/libmultipath/prioritizers/alua_spc3.h
+++ b/libmultipath/prioritizers/alua_spc3.h
@@ -302,6 +302,12 @@ rtpg_tpg_dscr_get_aas(struct rtpg_tpg_dscr *d)
return (d->b0 & 0x0f);
}
+static inline int
+rtpg_tpg_dscr_get_pref(struct rtpg_tpg_dscr *d)
+{
+ return ((d->b0 & 0x80)?AAS_OPTIMIZED:AAS_STANDBY);
+}
+
struct rtpg_data {
unsigned char length[4]; /* size-4 */
struct rtpg_tpg_dscr data[0];
--
1.6.5.1
0002-RH-path-checker.patch:
libmultipath/checkers/tur.c | 1
libmultipath/discovery.c | 62 ++++++++++++++++++++++++++++++++++----------
libmultipath/discovery.h | 2 +
multipathd/main.c | 22 +--------------
4 files changed, 52 insertions(+), 35 deletions(-)
--- NEW FILE 0002-RH-path-checker.patch ---
>From f9ddbc18b7580f75c15bf6f3e10f08d6f016caca Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue, 13 Oct 2009 08:18:00 +0200
Subject: [PATCH 02/12] RH: path checker
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 e06dc52... 47107a2... M libmultipath/checkers/tur.c
:100644 100644 98d1618... 00aa5ea... M libmultipath/discovery.c
:100644 100644 7283f36... 17cd4af... M libmultipath/discovery.h
:100644 100644 90de6df... 5d3625a... M multipathd/main.c
libmultipath/checkers/tur.c | 1 -
libmultipath/discovery.c | 62 +++++++++++++++++++++++++++++++++---------
libmultipath/discovery.h | 2 +
multipathd/main.c | 21 +-------------
4 files changed, 52 insertions(+), 34 deletions(-)
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
index e06dc52..47107a2 100644
--- a/libmultipath/checkers/tur.c
+++ b/libmultipath/checkers/tur.c
@@ -69,7 +69,6 @@ libcheck_check (struct checker * c)
case DID_NO_CONNECT:
case DID_BAD_TARGET:
case DID_ABORT:
- case DID_TRANSPORT_DISRUPTED:
case DID_TRANSPORT_FAILFAST:
break;
default:
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 98d1618..00aa5ea 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -579,10 +579,9 @@ struct sysfs_device *sysfs_device_from_path(struct path *pp)
}
int
-path_offline (struct path * pp)
+path_state (struct path * pp, char * buff)
{
struct sysfs_device * parent;
- char buff[SCSI_STATE_SIZE];
pp->sysdev = sysfs_device_from_path(pp);
if (!pp->sysdev) {
@@ -604,6 +603,16 @@ path_offline (struct path * pp)
return 1;
condlog(3, "%s: state = %s", pp->dev, buff);
+ return 0;
+}
+
+int
+path_offline (struct path * pp)
+{
+ char buff[SCSI_STATE_SIZE];
+
+ if (path_state(pp, buff))
+ return 1;
if (!strncmp(buff, "offline", 7)) {
pp->offline = 1;
@@ -613,6 +622,21 @@ path_offline (struct path * pp)
return 0;
}
+int
+path_blocked (struct path * pp)
+{
+ char buff[SCSI_STATE_SIZE];
+
+ if (pp->bus != SYSFS_BUS_SCSI)
+ return 0;
+ if (path_state(pp, buff))
+ return 0;
+ if (!strncmp(buff, "blocked", 7)) {
+ return 1;
+ }
+ return 0;
+}
+
extern int
sysfs_pathinfo(struct path * pp)
{
@@ -699,36 +723,43 @@ cciss_ioctl_pathinfo (struct path * pp, int mask)
return 0;
}
-static int
-get_state (struct path * pp)
+int
+get_state (struct path * pp, int daemon)
{
struct checker * c = &pp->checker;
+ int state;
condlog(3, "%s: get_state", pp->dev);
if (!checker_selected(c)) {
+ if (daemon)
+ pathinfo(pp, conf->hwtable, DI_SYSFS);
select_checker(pp);
if (!checker_selected(c)) {
condlog(3, "%s: No checker selected", pp->dev);
- return 1;
+ return PATH_UNCHECKED;
}
checker_set_fd(c, pp->fd);
if (checker_init(c, pp->mpp?&pp->mpp->mpcontext:NULL)) {
condlog(3, "%s: checker init failed", pp->dev);
- return 1;
+ return PATH_UNCHECKED;
}
}
if (path_offline(pp)) {
condlog(3, "%s: path offline", pp->dev);
- pp->state = PATH_DOWN;
- return 0;
+ return PATH_DOWN;
+ }
+ if (daemon) {
+ if (path_blocked(pp))
+ return PATH_PENDING;
+ checker_set_async(c);
}
- pp->state = checker_check(c);
- condlog(3, "%s: state = %i", pp->dev, pp->state);
- if (pp->state == PATH_DOWN && strlen(checker_message(c)))
+ state = checker_check(c);
+ condlog(3, "%s: state = %i", pp->dev, state);
+ if (state == PATH_DOWN && strlen(checker_message(c)))
condlog(3, "%s: checker msg is \"%s\"",
pp->dev, checker_message(c));
- return 0;
+ return state;
}
static int
@@ -813,8 +844,11 @@ pathinfo (struct path *pp, vector hwtable, int mask)
cciss_ioctl_pathinfo(pp, mask))
goto blank;
- if (mask & DI_CHECKER && get_state(pp))
- goto blank;
+ if (mask & DI_CHECKER) {
+ pp->state = get_state(pp, 0);
+ if (pp->state == PATH_UNCHECKED || pp->state == PATH_WILD)
+ goto blank;
+ }
/*
* Retrieve path priority, even for PATH_DOWN paths if it has never
diff --git a/libmultipath/discovery.h b/libmultipath/discovery.h
index 7283f36..17cd4af 100644
--- a/libmultipath/discovery.h
+++ b/libmultipath/discovery.h
@@ -30,6 +30,8 @@ int path_discovery (vector pathvec, struct config * conf, int flag);
int do_tur (char *);
int devt2devname (char *, char *);
int path_offline (struct path *);
+int get_state (struct path * pp, int daemon);
+int path_blocked (struct path *);
int pathinfo (struct path *, vector hwtable, int mask);
struct path * store_pathinfo (vector pathvec, vector hwtable,
char * devname, int flag);
diff --git a/multipathd/main.c b/multipathd/main.c
index 90de6df..5d3625a 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -908,26 +908,9 @@ check_path (struct vectors * vecs, struct path * pp)
*/
pp->tick = conf->checkint;
- if (!checker_selected(&pp->checker)) {
- pathinfo(pp, conf->hwtable, DI_SYSFS);
- select_checker(pp);
- }
- if (!checker_selected(&pp->checker)) {
- condlog(0, "%s: checker is not set", pp->dev);
- return;
- }
- /*
- * Set checker in async mode.
- * Honored only by checker implementing the said mode.
- */
- checker_set_async(&pp->checker);
-
- if (path_offline(pp))
- newstate = PATH_DOWN;
- else
- newstate = checker_check(&pp->checker);
+ newstate = get_state(pp, 1);
- if (newstate < 0) {
+ if (newstate == PATH_WILD || newstate == PATH_UNCHECKED) {
condlog(2, "%s: unusable path", pp->dev);
pathinfo(pp, conf->hwtable, 0);
return;
--
1.6.5.1
0003-RH-root-init-script.patch:
multipathd.init.redhat | 39 +++++++++++++++++++++++++++++++++++++--
1 file changed, 37 insertions(+), 2 deletions(-)
--- NEW FILE 0003-RH-root-init-script.patch ---
>From e6a23cc9de85a66d774567515592bdbdba7b2ca4 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue, 13 Oct 2009 08:19:01 +0200
Subject: [PATCH 03/12] RH: root init script
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 ee776f0... e46b1b8... M multipathd/multipathd.init.redhat
multipathd/multipathd.init.redhat | 38 ++++++++++++++++++++++++++++++++++++-
1 files changed, 37 insertions(+), 1 deletions(-)
diff --git a/multipathd/multipathd.init.redhat b/multipathd/multipathd.init.redhat
index ee776f0..e46b1b8 100644
--- a/multipathd/multipathd.init.redhat
+++ b/multipathd/multipathd.init.redhat
@@ -2,7 +2,7 @@
#
# multipathd Starts the multipath daemon
#
-# chkconfig: - 13 87
+# chkconfig: - 06 87
# description: Manages device-mapper multipath devices
### BEGIN INIT INFO
@@ -17,6 +17,7 @@ prog=`basename $DAEMON`
initdir=/etc/rc.d/init.d
lockdir=/var/lock/subsys
sysconfig=/etc/sysconfig
+syspath=/sys/block
. $initdir/functions
@@ -25,6 +26,36 @@ test -r $sysconfig/$prog && . $sysconfig/$prog
RETVAL=0
+teardown_slaves()
+{
+pushd $1 > /dev/null
+if [ -d "slaves" ]; then
+for slave in slaves/*;
+do
+ if [ "$slave" = "slaves/*" ]; then
+ read dev < $1/dev
+ tablename=`dmsetup table --target multipath | sed -n "s/\(.*\): .* $dev .*/\1/p"`
+ if ! [ -z $tablename ]; then
+ echo "Root is on a multipathed device, multipathd can not be stopped"
+ exit 1
+ fi
+ else
+ local_slave=`readlink -f $slave`;
+ teardown_slaves $local_slave;
+ fi
+ done
+
+else
+ read dev < $1/dev
+ tablename=`dmsetup table --target multipath | sed -n "s/\(.*\): .* $dev .*/\1/p"`
+ if ! [ -z $tablename ]; then
+ echo "Root is on a multipathed device, multipathd can not be stopped"
+ exit 1
+ fi
+fi
+popd > /dev/null
+}
+
#
# See how we were called.
#
@@ -39,6 +70,11 @@ start() {
}
stop() {
+ root_dev=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/mtab)
+ dm_num=`dmsetup info -c --noheadings -o minor $root_dev`
+ root_dm_device="dm-$dm_num"
+ [ -d $syspath/$root_dm_device ] && teardown_slaves $syspath/$root_dm_device
+
echo -n $"Stopping $prog daemon: "
killproc $DAEMON
RETVAL=$?
--
1.6.5.1
0004-RH-fix-kpartx.patch:
kpartx.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- NEW FILE 0004-RH-fix-kpartx.patch ---
>From 8d443fe2c58e22166426438e6f6d5757934f7b31 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue, 13 Oct 2009 08:23:42 +0200
Subject: [PATCH 04/12] RH: fix kpartx
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 b61a81f... 103ed0a... M kpartx/kpartx.c
kpartx/kpartx.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index b61a81f..103ed0a 100644
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -488,6 +488,7 @@ main(int argc, char **argv){
d = c;
while (c) {
for (j = 0; j < n; j++) {
+ uint64_t start;
int k = slices[j].container - 1;
if (slices[j].size == 0)
@@ -498,7 +499,7 @@ main(int argc, char **argv){
continue;
/* Skip all simple slices */
- if (k < 0)
+ if (slices[j].container == 0)
continue;
/* Check container slice */
@@ -513,10 +514,11 @@ main(int argc, char **argv){
}
strip_slash(partname);
+ start = slices[j].start - slices[k].start;
if (safe_sprintf(params, "%d:%d %" PRIu64,
slices[k].major,
slices[k].minor,
- slices[j].start)) {
+ start)) {
fprintf(stderr, "params too small\n");
exit(1);
}
--
1.6.5.1
0005-RH-cciss_id.patch:
Makefile | 3 -
cciss_id/Makefile | 47 ++++++++++++++++++
cciss_id/cciss_id.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 177 insertions(+), 2 deletions(-)
--- NEW FILE 0005-RH-cciss_id.patch ---
>From a3db7def912c2fd3756cfd99c1165db075281caa Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue, 13 Oct 2009 09:26:02 +0200
Subject: [PATCH 05/12] RH: cciss_id
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 54be0a5... 7e4b7b1... M Makefile
:000000 100644 0000000... 6db12a4... A cciss_id/Makefile
:000000 100644 0000000... 091b5fe... A cciss_id/cciss_id.c
Makefile | 3 +-
cciss_id/Makefile | 47 +++++++++++++++++++
cciss_id/cciss_id.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 177 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 54be0a5..7e4b7b1 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,8 @@ BUILDDIRS = \
libmultipath/checkers \
multipath \
multipathd \
- kpartx
+ kpartx \
+ cciss_id
ifeq ($(MULTIPATH_VERSION),)
VERSION = $(shell basename ${PWD} | cut -d'-' -f3)
diff --git a/cciss_id/Makefile b/cciss_id/Makefile
new file mode 100644
index 0000000..6db12a4
--- /dev/null
+++ b/cciss_id/Makefile
@@ -0,0 +1,47 @@
+
+# *****************************************************************************
+# * *
+# * (C) Copyright 2007 Hewlett-Packard Development Company, L.P *
+# * *
+# * This program is free software; you can redistribute it and/or modify it *
+# * under the terms of the GNU General Public License as published by the Free*
+# * Software Foundation; either version 2 of the License, or (at your option)*
+# * any later version. *
+# * *
+# * This program is distributed in the hope that it will be useful, but *
+# * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY*
+# * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
+# * for more details. *
+# * *
+# * 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., *
+# * 675 Mass Ave, Cambridge, MA 02139, USA. *
+# * *
+# * *
+# * *
+# * *
+# *****************************************************************************
+
+include ../Makefile.inc
+
+OBJS = cciss_id.o
+CFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes
+
+LDFLAGS = -ldevmapper
+
+EXEC = cciss_id
+
+all: $(EXEC)
+
+$(EXEC): $(OBJS)
+ $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS)
+
+install:
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
+
+uninstall:
+ rm $(DESTDIR)$(bindir)/$(EXEC)
+
+clean:
+ rm -f core.* *.o $(EXEC) *.gz
diff --git a/cciss_id/cciss_id.c b/cciss_id/cciss_id.c
new file mode 100644
index 0000000..091b5fe
--- /dev/null
+++ b/cciss_id/cciss_id.c
@@ -0,0 +1,128 @@
+/*
+ *****************************************************************************
+ * *
+ * (C) Copyright 2007 Hewlett-Packard Development Company, L.P *
+ * *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU General Public License as published by the Free*
+ * Software Foundation; either version 2 of the License, or (at your option)*
+ * any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, but *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY*
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
+ * for more details. *
+ * *
+ * 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., *
+ * 675 Mass Ave, Cambridge, MA 02139, USA. *
+ * *
+ * *
+ * *
+ * *
+ *****************************************************************************
+*/
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+
+#include <linux/cciss_ioctl.h>
+
+#define LEN_PAGE83_CCISSDEV 0x20 /* Page length of 83h for cciss devices */
+#define LEN_DEVICEFILE 255 /* Length of device file name */
+#define PATH_CCISSDEV "/dev/cciss/" /* Path of CCISS devices */
+int main(int argc, char *argv[])
+{
+ const int resp_len = LEN_PAGE83_CCISSDEV;
+ unsigned char resp[resp_len+1];
+ char dev_name[LEN_DEVICEFILE] = "\0" ;
+ unsigned int lun_id = 0;
+ int fd, status, i;
+ struct stat file_stat;
+
+ LogvolInfo_struct lvi; // logical "volume" info
+ IOCTL_Command_struct cic; // cciss ioctl command
+
+ if(argc < 2) {
+ fprintf(stderr, "Usage: %s /dev/cciss/cNdN\n", argv[0]);
+ return -1;
+ }
+
+ if ( strncmp(PATH_CCISSDEV, argv[1], strlen(PATH_CCISSDEV) ) != 0 ) {
+ if ( strchr(argv[1], '!') ) {
+ sprintf(dev_name, "%s%s", PATH_CCISSDEV,
+ strchr(argv[1], '!')+1);
+ }
+ //fprintf(stderr, "dev_name is: -%s-", dev_name);
+ } else {
+ sprintf(dev_name, "%s", argv[1]);
+ }
+
+ if (stat(dev_name, &file_stat) < 0) {
+ fprintf (stderr, "Stat failed for file %s. Errno=%d\n", dev_name, errno);
+ return -1;
+ }
+ if (!S_ISBLK(file_stat.st_mode)) {
+ fprintf (stderr, "File %s is not a block device. \n", dev_name);
+ return -1;
+ }
+
+
+ if((fd = open(dev_name, O_RDWR)) < 0) {
+ fprintf(stderr, "Open failed for file %s. Errno=%d\n", dev_name, errno);
+ return -1;
+ }
+
+ if (ioctl(fd, CCISS_GETLUNINFO, &lvi) < 0) {
+ fprintf(stderr, "IOCTL failure CCISS_GETLUNINFO for file %s Errno=%d\n", dev_name, errno);
+ close(fd);
+ return -1;
+ } else {
+ lun_id = lvi.LunID;
+ }
+
+ memset(&cic, 0, sizeof(IOCTL_Command_struct));
+ memset(resp, 0, resp_len+1);
+ cic.LUN_info.LogDev.Mode = 0x01; /* logical volume addressing */
+ cic.LUN_info.LogDev.VolId = lun_id & 0x3FFFFFFF;
+ cic.Request.CDBLen = 6;
+ cic.Request.Type.Type = TYPE_CMD; // It is a command.
+ cic.Request.Type.Attribute = ATTR_SIMPLE;
+ cic.Request.Type.Direction = XFER_READ; // Read
+ cic.Request.Timeout = 0; // Don't time out
+ cic.Request.CDB[0] = 0x12;
+ cic.Request.CDB[1] = 0x01; /* EVPD (enable vital product data) */
+ cic.Request.CDB[2] = 0x83;
+ cic.Request.CDB[4] = resp_len & 0xFF;
+ cic.buf_size = resp_len;
+ cic.buf = resp;
+ status = ioctl(fd, CCISS_PASSTHRU, &cic);
+ if(status) {
+ fprintf(stderr, "IOCTL failure CCISS_PASSTHRU for file %s Errno=%d\n", dev_name, errno);
+ close(fd);
+ return -1;
+ }
+ else {
+ if ((cic.error_info.CommandStatus | cic.error_info.ScsiStatus )) {
+ fprintf(stderr, "CCISS command status error for Inquiry on %s\n",
+ dev_name);
+ close(fd);
+ return -1;
+ }
+ printf("3");
+ for(i=8; i<24; i++)
+ /* printf("Buff[%d] =%x\n", i, resp[i]); */
+ printf("%02x", resp[i]);
+ printf("\n");
+ }
+
+ close(fd);
+ return 0;
+}
--
1.6.5.1
0006-RH-move-bindings.patch:
libmultipath/defaults.h | 2 +-
multipath.conf.annotated | 2 +-
multipath/multipath.conf.5 | 3 +--
3 files changed, 3 insertions(+), 4 deletions(-)
--- NEW FILE 0006-RH-move-bindings.patch ---
>From ff4c0c9ccbf8abe4a67c2a6cceef07bda9d38d7d Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue, 13 Oct 2009 09:26:25 +0200
Subject: [PATCH 06/12] RH: move bindings
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 84e5d6b... 5a38d25... M libmultipath/defaults.h
:100644 100644 9afa615... 7b6453f... M multipath.conf.annotated
:100644 100644 a165e4e... 4340e51... M multipath/multipath.conf.5
libmultipath/defaults.h | 2 +-
multipath.conf.annotated | 2 +-
multipath/multipath.conf.5 | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
index 84e5d6b..5a38d25 100644
--- a/libmultipath/defaults.h
+++ b/libmultipath/defaults.h
@@ -19,6 +19,6 @@
#define DEFAULT_PIDFILE "/var/run/multipathd.pid"
#define DEFAULT_SOCKET "/var/run/multipathd.sock"
#define DEFAULT_CONFIGFILE "/etc/multipath.conf"
-#define DEFAULT_BINDINGS_FILE "/var/lib/multipath/bindings"
+#define DEFAULT_BINDINGS_FILE "/etc/multipath/bindings"
char * set_default (char * str);
diff --git a/multipath.conf.annotated b/multipath.conf.annotated
index 9afa615..7b6453f 100644
--- a/multipath.conf.annotated
+++ b/multipath.conf.annotated
@@ -165,7 +165,7 @@
# # name : user_friendly_names
# # scope : multipath
# # desc : If set to "yes", using the bindings file
-# # /var/lib/multipath/bindings to assign a persistent and
+# # /etc/multipath/bindings to assign a persistent and
# # unique alias to the multipath, in the form of mpath<n>.
# # If set to "no" use the WWID as the alias. In either case
# # this be will be overriden by any specific aliases in this
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index a165e4e..4340e51 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -224,7 +224,7 @@ for never stop queueing. Default is 0.
If set to
.I yes
, using the bindings file
-.I /var/lib/multipath/bindings
+.I /etc/multipath/bindings
to assign a persistent and unique alias to the multipath, in the form of mpath<n>.
If set to
.I no
--
1.6.5.1
0007-RH-do-not-remove.patch:
main.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- NEW FILE 0007-RH-do-not-remove.patch ---
>From b3519ef2eda768672d47c61f0acf8c87d74db427 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue, 13 Oct 2009 09:33:59 +0200
Subject: [PATCH 07/12] RH: do not remove
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 5d3625a... 244b8d5... M multipathd/main.c
multipathd/main.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 5d3625a..244b8d5 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -290,8 +290,19 @@ ev_add_map (struct sysfs_device * dev, struct vectors * vecs)
static int
uev_remove_map (struct sysfs_device * dev, struct vectors * vecs)
{
+ struct multipath * mpp;
+
condlog(2, "%s: remove map (uevent)", dev->kernel);
- return ev_remove_map(dev->kernel, vecs);
+
+ mpp = find_mp_by_str(vecs->mpvec, dev->kernel);
+ if (!mpp) {
+ condlog(2, "%s: devmap not registered, can't remove",
+ dev->kernel);
+ return 0;
+ }
+ orphan_paths(vecs->pathvec, mpp);
+ remove_map_and_stop_waiter(mpp, vecs, 1);
+ return 0;
}
int
--
1.6.5.1
0008-RH-Make-build-system-RH-Fedora-friendly.patch:
Makefile.inc | 2 +-
kpartx/Makefile | 8 ++++----
multipathd/Makefile | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
--- NEW FILE 0008-RH-Make-build-system-RH-Fedora-friendly.patch ---
>From f5e11246063b07d6dce6d37d3b74662475baa981 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Thu, 15 Oct 2009 04:39:27 +0200
Subject: [PATCH 08/12] RH: Make build system RH/Fedora friendly
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(-)
diff --git a/Makefile.inc b/Makefile.inc
index 7ec25d5..06fb625 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -28,7 +28,7 @@ libudevdir = ${prefix}/lib/udev
multipathdir = $(TOPDIR)/libmultipath
mandir = $(prefix)/usr/share/man/man8
man5dir = $(prefix)/usr/share/man/man5
-rcdir = $(prefix)/etc/init.d
+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)
install: $(EXEC) $(EXEC).8
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
- $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
- $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
- $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
+# $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
+# $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
+# $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
+# $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
$(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
@@ -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)$(mandir)
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
--
1.6.5.1
0009-RH-multipathd-blacklist-all-by-default.patch:
config.c | 18 +++++++++++++++++-
config.h | 2 +-
2 files changed, 18 insertions(+), 2 deletions(-)
--- NEW FILE 0009-RH-multipathd-blacklist-all-by-default.patch ---
>From 61b2002c6b2752c15b431e400cd614edc8c5b039 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Mon, 19 Oct 2009 07:05:45 +0200
Subject: [PATCH 09/12] RH: multipathd blacklist all by default
If there is no configuration installed on the system, blacklist
everything by default.
BZ#528059
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.h | 1 +
2 files changed, 18 insertions(+), 1 deletions(-)
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"
#include "defaults.h"
#include "prio.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 {
+ 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;
+ }
+ if (store_ble(conf->blist_devnode, strdup(".*"),
+ 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 @@
#define ORIGIN_DEFAULT 0
#define ORIGIN_CONFIG 1
+#define ORIGIN_NO_CONFIG 2
enum devtypes {
DEV_NONE,
--
1.6.5.1
0010-RH-multipath-rules-udev-changes.patch:
multipath.rules | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
--- NEW FILE 0010-RH-multipath-rules-udev-changes.patch ---
>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/multipath.rules | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/multipath/multipath.rules b/multipath/multipath.rules
index ac97749..064196d 100644
--- a/multipath/multipath.rules
+++ b/multipath/multipath.rules
@@ -1,7 +1,11 @@
-#
-# 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"
+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-?*", GOTO="end_mpath"
+ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
+RUN+="/sbin/kpartx -a -p p $tempnode"
+LABEL="end_mpath"
--
1.6.5.1
0011-RH-fix-init-script-LSB-headers.patch:
multipathd.init.redhat | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- NEW FILE 0011-RH-fix-init-script-LSB-headers.patch ---
>From 887b0721d29eed45621b5a7fefaf462378cc9dcd Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Mon, 19 Oct 2009 08:33:07 +0200
Subject: [PATCH 11/12] RH: fix init script LSB headers
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 e46b1b8... cfc9cf5... M multipathd/multipathd.init.redhat
multipathd/multipathd.init.redhat | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/multipathd/multipathd.init.redhat b/multipathd/multipathd.init.redhat
index e46b1b8..cfc9cf5 100644
--- a/multipathd/multipathd.init.redhat
+++ b/multipathd/multipathd.init.redhat
@@ -7,6 +7,10 @@
### BEGIN INIT INFO
# Provides: multipathd
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:
# Short-Description: Control multipathd
# Description: This service monitors and manages
# device-mapper multipath devices
--
1.6.5.1
0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch:
kpartx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- NEW FILE 0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch ---
>From c104e104645fcf271956e174eca9ccbf0e443014 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto at redhat.com>
Date: Tue, 20 Oct 2009 15:17:13 +0200
Subject: [PATCH 12/12] RH: explicitly disable dm udev sync support in kpartx
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
:100644 100644 103ed0a... 9619edb... M kpartx/kpartx.c
kpartx/kpartx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index 103ed0a..9619edb 100644
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -256,6 +256,10 @@ main(int argc, char **argv){
exit(1);
}
+#ifdef DM_COOKIE_MAGIC
+ dm_udev_set_sync_support(0);
+#endif
+
if (dm_prereq(DM_TARGET, 0, 0, 0) && (what == ADD || what == DELETE)) {
fprintf(stderr, "device mapper prerequisites not met\n");
exit(1);
--
1.6.5.1
--- NEW FILE import.log ---
device-mapper-multipath-0_4_9-10_fc13:HEAD:device-mapper-multipath-0.4.9-10.fc13.src.rpm:1256637500
--- NEW FILE multipath.conf.redhat ---
# This is a basic configuration file with some examples, for device mapper
# multipath.
# For a complete list of the default configuration values, see
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults
# For a list of configuration options with descriptions, see
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated
# Blacklist all devices by default. Remove this to enable multipathing
# on the default devices.
blacklist {
devnode "*"
}
## By default, devices with vendor = "IBM" and product = "S/390.*" are
## blacklisted. To enable mulitpathing on these devies, uncomment the
## following lines.
#blacklist_exceptions {
# device {
# vendor "IBM"
# product "S/390.*"
# }
#}
## Use user friendly names, instead of using WWIDs as names.
defaults {
user_friendly_names yes
}
##
## Here is an example of how to configure some standard options.
##
#
#defaults {
# udev_dir /dev
# polling_interval 10
# selector "round-robin 0"
# path_grouping_policy multibus
# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
# prio alua
# path_checker readsector0
# rr_min_io 100
# max_fds 8192
# rr_weight priorities
# failback immediate
# no_path_retry fail
# user_friendly_names yes
#}
##
## The wwid line in the following blacklist section is shown as an example
## of how to blacklist devices by wwid. The 2 devnode lines are the
## compiled in default blacklist. If you want to blacklist entire types
## of devices, such as all scsi devices, you should use a devnode line.
## However, if you want to blacklist specific devices, you should use
## a wwid line. Since there is no guarantee that a specific device will
## not change names on reboot (from /dev/sda to /dev/sdb for example)
## devnode lines are not recommended for blacklisting specific devices.
##
#blacklist {
# wwid 26353900f02796769
# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
# devnode "^hd[a-z]"
#}
#multipaths {
# multipath {
# wwid 3600508b4000156d700012000000b0000
# alias yellow
# path_grouping_policy multibus
# path_checker readsector0
# path_selector "round-robin 0"
# failback manual
# rr_weight priorities
# no_path_retry 5
# }
# multipath {
# wwid 1DEC_____321816758474
# alias red
# }
#}
#devices {
# device {
# vendor "COMPAQ "
# product "HSV110 (C)COMPAQ"
# path_grouping_policy multibus
# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
# path_checker readsector0
# path_selector "round-robin 0"
# hardware_handler "0"
# failback 15
# rr_weight priorities
# no_path_retry queue
# }
# device {
# vendor "COMPAQ "
# product "MSA1000 "
# path_grouping_policy multibus
# }
#}
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/device-mapper-multipath/devel/.cvsignore,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- .cvsignore 29 Jul 2009 22:54:06 -0000 1.18
+++ .cvsignore 27 Oct 2009 09:58:59 -0000 1.19
@@ -1 +1 @@
-multipath-tools-090729.tgz
+multipath-tools-091027.tar.gz
Index: device-mapper-multipath.spec
===================================================================
RCS file: /cvs/pkgs/rpms/device-mapper-multipath/devel/device-mapper-multipath.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -p -r1.62 -r1.63
--- device-mapper-multipath.spec 20 Aug 2009 22:28:44 -0000 1.62
+++ device-mapper-multipath.spec 27 Oct 2009 09:58:59 -0000 1.63
@@ -1,85 +1,85 @@
Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath
Version: 0.4.9
-Release: 5%{?dist}
+Release: 10%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
-Source0: multipath-tools-090729.tgz
-Patch0: fix_missed_uevs.patch
-Patch1: log_all_messages.patch
-Patch2: queue_without_daemon.patch
-Patch3: path_checker.patch
-Patch4: root_init_script.patch
-Patch5: uninstall.patch
-Patch6: select_lib.patch
-Patch7: directio_message_cleanup.patch
-Patch8: fix_kpartx.patch
-Patch9: redhatification.patch
-Patch10: mpath_wait.patch
-Patch11: multipath_rules.patch
-Patch12: cciss_id.patch
-Patch13: stop_warnings.patch
-Patch14: move_bindings.patch
-Patch15: dont_remove.patch
-Patch16: udev_change.patch
+Source0: multipath-tools-091027.tar.gz
+Source1: multipath.conf.redhat
+# patch that should go upstream
+Patch1: 0001-for-upstream-add-tpg_pref-prioritizer.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-explicitly-disable-dm-udev-sync-support-in-kpartx.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# runtime
Requires: %{name}-libs = %{version}-%{release}
Requires: kpartx = %{version}-%{release}
-Requires: device-mapper >= 1.02.02-2
+Requires: device-mapper >= 1.02.39-1
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
-BuildRequires: libaio-devel, device-mapper-devel
+
+# build/setup
+BuildRequires: libaio-devel, device-mapper-devel >= 1.02.39-1
BuildRequires: libselinux-devel, libsepol-devel
BuildRequires: readline-devel, ncurses-devel
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
%description
%{name} provides tools to manage multipath devices by
instructing the device-mapper multipath kernel module what to do.
The tools are :
-* multipath : Scan the system for multipath devices and assemble them.
-* multipathd : Detects when paths fail and execs multipath to update things.
+* multipath - Scan the system for multipath devices and assemble them.
+* multipathd - Detects when paths fail and execs multipath to update things.
%package libs
-Summary: %{name} modules and shared library
+Summary: The %{name} modules and shared library
License: GPL+
Group: System Environment/Libraries
%description libs
-%{name}-libs provides the path checker and prioritizer modules. It also
-contains the multipath shared library, libmultipath.
+The %{name}-libs provides the path checker
+and prioritizer modules. It also contains the multipath shared library,
+libmultipath.
%package -n kpartx
Summary: Partition device manager for device-mapper devices
Group: System Environment/Base
-Provides: kpartx = %{version}-%{release}
%description -n kpartx
kpartx manages partition creation and removal for device-mapper devices.
%prep
%setup -q -n multipath-tools
-%patch0 -p1 -b .fix_missed_uevs
-%patch1 -p1 -b .log_all_messages
-%patch2 -p1 -b .queue_without_daemon
-%patch3 -p1 -b .path_checker
-%patch4 -p1 -b .root_init_script
-%patch5 -p1 -b .uninstall.patch
-%patch6 -p1 -b .select_lib
-%patch7 -p1 -b .directio_message_cleanup
-%patch8 -p1 -b .fix_kpartx
-%patch9 -p1 -b .redhatification
-%patch10 -p1 -b .mpath_wait
-%patch11 -p1 -b .multipath_rules
-%patch12 -p1 -b .cciss_id
-%patch13 -p1 -b .stop_warnings
-%patch14 -p1 -b .move_bindings
-%patch15 -p1 -b .dont_remove
-%patch16 -p1 -b .udev_change
+%patch1 -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
+cp %{SOURCE1} .
%build
%define _sbindir /sbin
@@ -88,17 +88,25 @@ kpartx manages partition creation and re
make %{?_smp_mflags} LIB=%{_lib}
%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT bindir=%{_sbindir} syslibdir=%{_libdir} libdir=%{_libmpathdir} rcdir=%{_initrddir}
-install -m 0644 multipath/multipath.conf.redhat $RPM_BUILD_ROOT/etc/multipath.conf
-install -m 0755 multipathd/multipathd.init.redhat $RPM_BUILD_ROOT/%{_initrddir}/multipathd
-install -d $RPM_BUILD_ROOT/etc/multipath
+rm -rf %{buildroot}
+
+make install \
+ DESTDIR=%{buildroot} \
+ bindir=%{_sbindir} \
+ syslibdir=%{_libdir} \
+ libdir=%{_libmpathdir} \
+ rcdir=%{_initrddir}
+
+# tree fix up
+# install -m 0644 %{SOURCE1} %{buildroot}/etc/multipath.conf
+install -d %{buildroot}/etc/multipath
+mv %{buildroot}/etc/udev/rules.d/multipath.rules \
+ %{buildroot}/etc/udev/rules.d/40-multipath.rules
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%post
-/sbin/ldconfig
/sbin/chkconfig --add multipathd
if [ "$1" -gt "1" -a ! -e /etc/multipath/bindings -a \
-f /var/lib/multipath/bindings ]; then
@@ -106,17 +114,15 @@ if [ "$1" -gt "1" -a ! -e /etc/multipath
ln -s /etc/multipath/bindings /var/lib/multipath/bindings
fi
-
%preun
if [ "$1" = 0 ]; then
- /sbin/service multipathd stop /dev/null 2>&1
- /sbin/chkconfig --del multipathd
+ /sbin/service multipathd stop /dev/null 2>&1
+ /sbin/chkconfig --del multipathd
fi
%postun
-/sbin/ldconfig
if [ "$1" -ge "1" ]; then
- /sbin/service multipathd condrestart >/dev/null 2>&1 || :
+ /sbin/service multipathd condrestart >/dev/null 2>&1 || :
fi
%files
@@ -124,21 +130,26 @@ fi
%{_sbindir}/multipath
%{_sbindir}/multipathd
%{_sbindir}/cciss_id
-%{_sbindir}/mpath_wait
%{_initrddir}/multipathd
%{_mandir}/man5/multipath.conf.5.gz
%{_mandir}/man8/multipath.8.gz
%{_mandir}/man8/multipathd.8.gz
%config /etc/udev/rules.d/40-multipath.rules
-%config(noreplace) /etc/multipath.conf
-%doc AUTHOR COPYING README* FAQ multipath.conf.annotated multipath.conf.defaults multipath.conf.synthetic
+%doc AUTHOR COPYING FAQ
+%doc multipath.conf.redhat multipath.conf.annotated
+%doc multipath.conf.defaults multipath.conf.synthetic
%dir /etc/multipath
%files libs
%defattr(-,root,root,-)
+%doc AUTHOR COPYING
%{_libdir}/libmultipath.so
-%{_libmpathdir}
%dir %{_libmpathdir}
+%{_libmpathdir}/*
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
%files -n kpartx
%defattr(-,root,root,-)
@@ -146,7 +157,64 @@ fi
%{_mandir}/man8/kpartx.8.gz
%changelog
-* Thu Aug 20 2009 Benjamin Marzinski <bmarzins at redhat.com> - 0.4.8-5
+* Tue Oct 27 2009 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.4.9-10
+- Updated to latest upstream 0.4.9 code : multipath-tools-091027.tar.gz
+ (git commit id: a946bd4e2a529e5fba9c9547d03d3f91806618a3)
+- Drop unrequired for-upstream patches.
+- BuildRequires and Requires new device-mapper version for udev sync support.
+
+* Tue Oct 20 2009 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.4.9-9
+- 0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch
+
+* Mon Oct 19 2009 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.4.9-8
+- Split patches in "for-upstream" and "RH" series.
+- Replace 0011-RH-multipathd-blacklist-all-by-default.patch with
+ version from Benjamin Marzinski.
+- Update udev rules 0010-RH-multipath-rules-udev-changes.patch.
+- rpmlint cleanup:
+ * Drop useless-provides kpartx.
+ * Cleanup tab vs spaces usage.
+ * Summary not capitalized.
+ * Missing docs in libs package.
+ * Fix init script LSB headers.
+- Drop README* files from doc sections (they are empty).
+
+* Thu Oct 15 2009 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.4.9-7
+- Add patch 0010-RH-Set-friendly-defaults.patch:
+ * set rcdir to fedora default.
+ * do not install kpartx udev bits.
+ * install redhat init script.
+ * Cleanup spec file install target.
+- Add patch 0011-RH-multipathd-blacklist-all-by-default.patch:
+ * Fix BZ#528059
+ * Stop installing default config in /etc and move it to the doc dir.
+
+* Tue Oct 13 2009 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.4.9-6
+- Updated to latest upstream 0.4.9 code : multipath-tools-091013.tar.gz
+ (git commit id: aa0a885e1f19359c41b63151bfcface38ccca176)
+- Drop, now upstream, patches:
+ * fix_missed_uevs.patch.
+ * log_all_messages.patch.
+ * uninstall.patch.
+ * select_lib.patch.
+ * directio_message_cleanup.patch.
+ * stop_warnings.patch.
+- Drop redhatification.patch in favour of spec file hacks.
+- Drop mpath_wait.patch: no longer required.
+- Merge multipath_rules.patch and udev_change.patch.
+- Rename all patches based on source.
+- Add patch 0009-RH-fix-hp-sw-hardware-table-entries.patch to fix
+ default entry for hp_sw and match current kernel.
+- Add multipath.conf.redhat as source instead of patch.
+- spec file:
+ * divide runtime and build/setup bits.
+ * update BuildRoot.
+ * update install section to apply all the little hacks here and there,
+ in favour of patches against upstream.
+ * move ldconfig invokation to libs package where it belong.
+ * fix libs package directory ownership and files.
+
+* Thu Aug 20 2009 Benjamin Marzinski <bmarzins at redhat.com> - 0.4.9-5
- Fixed problem where maps were being added and then removed.
- Changed the udev rules to fix some issues.
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/device-mapper-multipath/devel/sources,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- sources 29 Jul 2009 22:54:06 -0000 1.19
+++ sources 27 Oct 2009 09:58:59 -0000 1.20
@@ -1 +1 @@
-89a2e3d5ee8e78c7fb487cae00345815 multipath-tools-090729.tgz
+af9cc98e278066cabfa2f47e8852f506 multipath-tools-091027.tar.gz
--- bindings_file.patch DELETED ---
--- cciss_id.patch DELETED ---
--- directio_message_cleanup.patch DELETED ---
--- dont_remove.patch DELETED ---
--- fix_kpartx.patch DELETED ---
--- fix_missed_uevs.patch DELETED ---
--- log_all_messages.patch DELETED ---
--- move_bindings.patch DELETED ---
--- mpath_wait.patch DELETED ---
--- multipath_rules.patch DELETED ---
--- path_checker.patch DELETED ---
--- queue_without_daemon.patch DELETED ---
--- redhatification.patch DELETED ---
--- root_init_script.patch DELETED ---
--- select_lib.patch DELETED ---
--- stop_warnings.patch DELETED ---
--- udev_change.patch DELETED ---
--- uninstall.patch DELETED ---
- Previous message (by thread): rpms/eclipse-mylyn/devel fetch-mylyn.sh, 1.11, 1.12 eclipse-mylyn.spec, 1.41, 1.42 .cvsignore, 1.10, 1.11 eclipse-mylyn-wikitext_builddoc.patch, 1.2, 1.3 eclipse-mylyn-addfedoracustomizations.patch, 1.9, 1.10 sources, 1.13, 1.14
- Next message (by thread): rpms/ocaml/devel ocaml.spec,1.61,1.62
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list