summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2012-10-23 21:29:37 +0000
committerBenjamin Marzinski <bmarzins@redhat.com>2012-10-23 21:29:37 +0000
commitfd54c41ec099fad8d6555569805d75419d58b2b5 (patch)
treee4da22913a1281c9a2437c0304951a914828ffa6
parent67e579f751e1ed13e36f0e10ec5de23d3fcc7531 (diff)
downloaddevice-mapper-multipath-fd54c41ec099fad8d6555569805d75419d58b2b5.tar.gz
device-mapper-multipath-fd54c41ec099fad8d6555569805d75419d58b2b5.tar.xz
device-mapper-multipath-fd54c41ec099fad8d6555569805d75419d58b2b5.zip
device-mapper-multipath-0.4.9-33
Modify 0016-RH-retain_hwhandler.patch * Check the dm-multipath module version, and don't enable retain_attached_hw_handler if the kernel doesn't support it Add 0019-RH-detect-prio.patch * add detect_prio option, to make multipath check if the device supports the ALUA prio, before defaulting to the configured prio Remove 0017-RH-netapp_config.patch Add 0020-RH-netapp-config.patch * new netapp config that uses retain_attached_hw_handler and detect_prio to autoconfigure ALUA and non-ALUA devices.
-rw-r--r--0016-RH-retain_hwhandler.patch143
-rw-r--r--0017-RH-netapp_config.patch50
-rw-r--r--0019-RH-detect-prio.patch319
-rw-r--r--0020-RH-netapp-config.patch21
-rw-r--r--device-mapper-multipath.spec22
5 files changed, 495 insertions, 60 deletions
diff --git a/0016-RH-retain_hwhandler.patch b/0016-RH-retain_hwhandler.patch
index 6c69b4f..040297c 100644
--- a/0016-RH-retain_hwhandler.patch
+++ b/0016-RH-retain_hwhandler.patch
@@ -1,14 +1,16 @@
---
- libmultipath/config.c | 3 +
- libmultipath/config.h | 2 +
+ libmultipath/config.c | 5 ++-
+ libmultipath/config.h | 4 +-
libmultipath/configure.c | 7 +++-
libmultipath/defaults.h | 1
+ libmultipath/devmapper.c | 34 +++------------------
+ libmultipath/devmapper.h | 8 ++++-
libmultipath/dict.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++
libmultipath/dmparser.c | 3 +
- libmultipath/propsel.c | 17 ++++++++++
+ libmultipath/propsel.c | 29 +++++++++++++++++-
libmultipath/propsel.h | 1
libmultipath/structs.h | 7 ++++
- 9 files changed, 113 insertions(+), 2 deletions(-)
+ 11 files changed, 138 insertions(+), 35 deletions(-)
Index: multipath-tools-120821/libmultipath/config.c
===================================================================
@@ -30,6 +32,15 @@ Index: multipath-tools-120821/libmultipath/config.c
if (dhwe->bl_product && !(hwe->bl_product = set_param_str(dhwe->bl_product)))
goto out;
+@@ -502,7 +504,7 @@ load_config (char * file)
+ conf->verbosity = DEFAULT_VERBOSITY;
+
+ conf->udev = udev_new();
+- conf->dmrq = dm_drv_get_rq();
++ dm_drv_version(conf->version, TGT_MPATH);
+ conf->dev_type = DEV_NONE;
+ conf->minio = DEFAULT_MINIO;
+ conf->minio_rq = DEFAULT_MINIO_RQ;
@@ -519,6 +521,7 @@ load_config (char * file)
conf->max_checkint = MAX_CHECKINT(conf->checkint);
conf->find_multipaths = DEFAULT_FIND_MULTIPATHS;
@@ -50,11 +61,20 @@ Index: multipath-tools-120821/libmultipath/config.h
char * bl_product;
};
-@@ -110,6 +111,7 @@ struct config {
+@@ -75,7 +76,6 @@ struct mpentry {
+ };
+
+ struct config {
+- int dmrq;
+ int verbosity;
+ int dry_run;
+ int list;
+@@ -110,6 +110,8 @@ struct config {
mode_t mode;
uint32_t cookie;
int reassign_maps;
+ int retain_hwhandler;
++ unsigned int version[3];
char * dev;
struct udev * udev;
@@ -265,13 +285,32 @@ Index: multipath-tools-120821/libmultipath/propsel.c
===================================================================
--- multipath-tools-120821.orig/libmultipath/propsel.c
+++ multipath-tools-120821/libmultipath/propsel.c
-@@ -674,3 +674,20 @@ select_reservation_key (struct multipath
+@@ -513,7 +513,9 @@ select_minio_bio (struct multipath * mp)
+ extern int
+ select_minio (struct multipath * mp)
+ {
+- if (conf->dmrq)
++ unsigned int minv_dmrq[3] = {1, 1, 0};
++
++ if (VERSION_GE(conf->version, minv_dmrq))
+ return select_minio_rq(mp);
+ else
+ return select_minio_bio(mp);
+@@ -674,3 +676,28 @@ select_reservation_key (struct multipath
return 0;
}
+extern int
+select_retain_hwhandler (struct multipath * mp)
+{
++ unsigned int minv_dm_retain[3] = {1, 5, 0};
++
++ if (!VERSION_GE(conf->version, minv_dm_retain)) {
++ mp->retain_hwhandler = RETAIN_HWHANDLER_OFF;
++ condlog(3, "%s: retain_attached_hw_hander disabled (requires kernel version >= 1.5.0)", mp->alias);
++ return 0;
++ }
++
+ if (mp->hwe && mp->hwe->retain_hwhandler) {
+ mp->retain_hwhandler = mp->hwe->retain_hwhandler;
+ condlog(3, "%s: retain_attached_hw_handler = %d (controller default)", mp->alias, mp->retain_hwhandler);
@@ -294,4 +333,94 @@ Index: multipath-tools-120821/libmultipath/propsel.h
int select_fast_io_fail(struct multipath *mp);
int select_dev_loss(struct multipath *mp);
int select_reservation_key(struct multipath *mp);
-+extern int select_retain_hwhandler (struct multipath * mp);
++int select_retain_hwhandler (struct multipath * mp);
+Index: multipath-tools-120821/libmultipath/devmapper.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/devmapper.c
++++ multipath-tools-120821/libmultipath/devmapper.c
+@@ -98,12 +98,6 @@ dm_init(void) {
+ dm_log_init_verbose(conf ? conf->verbosity + 3 : 0);
+ }
+
+-#define VERSION_GE(v, minv) ( \
+- (v[0] > minv[0]) || \
+- ((v[0] == minv[0]) && (v[1] > minv[1])) || \
+- ((v[0] == minv[0]) && (v[1] == minv[1]) && (v[2] >= minv[2])) \
+-)
+-
+ static int
+ dm_lib_prereq (void)
+ {
+@@ -126,7 +120,7 @@ dm_lib_prereq (void)
+ return 1;
+ }
+
+-static int
++int
+ dm_drv_version (unsigned int * version, char * str)
+ {
+ int r = 2;
+@@ -135,6 +129,10 @@ dm_drv_version (unsigned int * version,
+ struct dm_versions *last_target;
+ unsigned int *v;
+
++ version[0] = 0;
++ version[1] = 0;
++ version[2] = 0;
++
+ if (!(dmt = dm_task_create(DM_DEVICE_LIST_VERSIONS)))
+ return 1;
+
+@@ -169,28 +167,6 @@ out:
+ return r;
+ }
+
+-int
+-dm_drv_get_rq (void)
+-{
+- unsigned int minv_dmrq[3] = {1, 1, 0};
+- unsigned int version[3] = {0, 0, 0};
+- unsigned int * v = version;
+-
+- if (dm_drv_version(v, TGT_MPATH)) {
+- /* in doubt return least capable */
+- return 0;
+- }
+-
+- /* test request based multipath capability */
+- if VERSION_GE(v, minv_dmrq) {
+- condlog(3, "activate request-based multipathing mode "
+- "(driver >= v%u.%u.%u)",
+- minv_dmrq[0], minv_dmrq[1], minv_dmrq[2]);
+- return 1;
+- }
+- return 0;
+-}
+-
+ static int
+ dm_drv_prereq (void)
+ {
+Index: multipath-tools-120821/libmultipath/devmapper.h
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/devmapper.h
++++ multipath-tools-120821/libmultipath/devmapper.h
+@@ -8,7 +8,7 @@
+
+ void dm_init(void);
+ int dm_prereq (void);
+-int dm_drv_get_rq (void);
++int dm_drv_version (unsigned int * version, char * str);
+ int dm_simplecmd_flush (int, const char *, int);
+ int dm_simplecmd_noflush (int, const char *);
+ int dm_addmap_create (struct multipath *mpp, char *params);
+@@ -46,4 +46,10 @@ int dm_setgeometry(struct multipath *mpp
+ void udev_wait(unsigned int c);
+ void udev_set_sync_support(int c);
+
++#define VERSION_GE(v, minv) ( \
++ (v[0] > minv[0]) || \
++ ((v[0] == minv[0]) && (v[1] > minv[1])) || \
++ ((v[0] == minv[0]) && (v[1] == minv[1]) && (v[2] >= minv[2])) \
++)
++
+ #endif /* _DEVMAPPER_H */
diff --git a/0017-RH-netapp_config.patch b/0017-RH-netapp_config.patch
deleted file mode 100644
index 675af9e..0000000
--- a/0017-RH-netapp_config.patch
+++ /dev/null
@@ -1,50 +0,0 @@
----
- libmultipath/hwtable.c | 21 +++++++++++++++++++--
- 1 file changed, 19 insertions(+), 2 deletions(-)
-
-Index: multipath-tools-120821/libmultipath/hwtable.c
-===================================================================
---- multipath-tools-120821.orig/libmultipath/hwtable.c
-+++ multipath-tools-120821/libmultipath/hwtable.c
-@@ -864,15 +864,16 @@ static struct hwentry default_hw[] = {
- .vendor = "NETAPP",
- .product = "LUN.*",
- .features = "3 queue_if_no_path pg_init_retries 50",
-- .hwhandler = DEFAULT_HWHANDLER,
-+ .hwhandler = "1 alua",
- .pgpolicy = GROUP_BY_PRIO,
- .pgfailback = -FAILBACK_IMMEDIATE,
- .flush_on_last_del = FLUSH_ENABLED,
- .rr_weight = RR_WEIGHT_NONE,
- .no_path_retry = NO_PATH_RETRY_UNDEF,
- .minio = 128,
-+ .dev_loss = MAX_DEV_LOSS_TMO,
- .checker_name = TUR,
-- .prio_name = PRIO_ONTAP,
-+ .prio_name = PRIO_ALUA,
- .prio_args = NULL,
- },
- /*
-@@ -1135,6 +1136,22 @@ static struct hwentry default_hw[] = {
- .prio_args = NULL,
- },
- {
-+ .vendor = "NETAPP",
-+ .product = "INF-01-00",
-+ .bl_product = "Universal Xport",
-+ .features = "2 pg_init_retries 50",
-+ .hwhandler = "2 alua 1",
-+ .pgpolicy = GROUP_BY_PRIO,
-+ .pgfailback = -FAILBACK_IMMEDIATE,
-+ .rr_weight = RR_WEIGHT_NONE,
-+ .no_path_retry = 15,
-+ .minio = DEFAULT_MINIO,
-+ .minio_rq = DEFAULT_MINIO_RQ,
-+ .checker_name = TUR,
-+ .prio_name = PRIO_ALUA,
-+ .prio_args = NULL,
-+ },
-+ {
- .vendor = "STK",
- .product = "FLEXLINE 380",
- .bl_product = "Universal Xport",
diff --git a/0019-RH-detect-prio.patch b/0019-RH-detect-prio.patch
new file mode 100644
index 0000000..f11409b
--- /dev/null
+++ b/0019-RH-detect-prio.patch
@@ -0,0 +1,319 @@
+---
+ libmultipath/Makefile | 2 -
+ libmultipath/config.c | 3 +
+ libmultipath/config.h | 2 +
+ libmultipath/defaults.h | 1
+ libmultipath/dict.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++
+ libmultipath/discovery.c | 1
+ libmultipath/propsel.c | 41 ++++++++++++++++++++++++++
+ libmultipath/propsel.h | 1
+ libmultipath/structs.h | 7 ++++
+ 9 files changed, 131 insertions(+), 1 deletion(-)
+
+Index: multipath-tools-120821/libmultipath/config.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/config.c
++++ multipath-tools-120821/libmultipath/config.c
+@@ -331,6 +331,7 @@ merge_hwe (struct hwentry * dst, struct
+ merge_num(dev_loss);
+ merge_num(user_friendly_names);
+ merge_num(retain_hwhandler);
++ merge_num(detect_prio);
+
+ return 0;
+ }
+@@ -391,6 +392,7 @@ store_hwe (vector hwtable, struct hwentr
+ hwe->dev_loss = dhwe->dev_loss;
+ hwe->user_friendly_names = dhwe->user_friendly_names;
+ hwe->retain_hwhandler = dhwe->retain_hwhandler;
++ hwe->detect_prio = dhwe->detect_prio;
+
+ if (dhwe->bl_product && !(hwe->bl_product = set_param_str(dhwe->bl_product)))
+ goto out;
+@@ -532,6 +534,7 @@ load_config (char * file)
+ conf->find_multipaths = DEFAULT_FIND_MULTIPATHS;
+ conf->fast_io_fail = 5;
+ conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER;
++ conf->detect_prio = DEFAULT_DETECT_PRIO;
+
+ /*
+ * preload default hwtable
+Index: multipath-tools-120821/libmultipath/config.h
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/config.h
++++ multipath-tools-120821/libmultipath/config.h
+@@ -47,6 +47,7 @@ struct hwentry {
+ unsigned int dev_loss;
+ int user_friendly_names;
+ int retain_hwhandler;
++ int detect_prio;
+ char * bl_product;
+ };
+
+@@ -111,6 +112,7 @@ struct config {
+ uint32_t cookie;
+ int reassign_maps;
+ int retain_hwhandler;
++ int detect_prio;
+ unsigned int version[3];
+
+ char * dev;
+Index: multipath-tools-120821/libmultipath/defaults.h
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/defaults.h
++++ multipath-tools-120821/libmultipath/defaults.h
+@@ -17,6 +17,7 @@
+ #define DEFAULT_REASSIGN_MAPS 1
+ #define DEFAULT_FIND_MULTIPATHS 0
+ #define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_OFF
++#define DEFAULT_DETECT_PRIO DETECT_PRIO_OFF
+
+ #define DEFAULT_CHECKINT 5
+ #define MAX_CHECKINT(a) (a << 2)
+Index: multipath-tools-120821/libmultipath/dict.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/dict.c
++++ multipath-tools-120821/libmultipath/dict.c
+@@ -673,6 +673,29 @@ def_retain_hwhandler_handler(vector strv
+ return 0;
+ }
+
++static int
++def_detect_prio_handler(vector strvec)
++{
++ char * buff;
++
++ buff = set_value(strvec);
++
++ if (!buff)
++ return 1;
++
++ if ((strlen(buff) == 2 && !strcmp(buff, "no")) ||
++ (strlen(buff) == 1 && !strcmp(buff, "0")))
++ conf->detect_prio = DETECT_PRIO_OFF;
++ else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) ||
++ (strlen(buff) == 1 && !strcmp(buff, "1")))
++ conf->detect_prio = DETECT_PRIO_ON;
++ else
++ conf->detect_prio = DETECT_PRIO_UNDEF;
++
++ FREE(buff);
++ return 0;
++}
++
+ /*
+ * blacklist block handlers
+ */
+@@ -1321,6 +1344,33 @@ hw_retain_hwhandler_handler(vector strve
+ return 0;
+ }
+
++static int
++hw_detect_prio_handler(vector strvec)
++{
++ struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable);
++ char * buff;
++
++ if (!hwe)
++ return 1;
++
++ buff = set_value(strvec);
++
++ if (!buff)
++ return 1;
++
++ if ((strlen(buff) == 2 && !strcmp(buff, "no")) ||
++ (strlen(buff) == 1 && !strcmp(buff, "0")))
++ hwe->detect_prio = DETECT_PRIO_OFF;
++ else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) ||
++ (strlen(buff) == 1 && !strcmp(buff, "1")))
++ hwe->detect_prio = DETECT_PRIO_ON;
++ else
++ hwe->detect_prio = DETECT_PRIO_UNDEF;
++
++ FREE(buff);
++ return 0;
++}
++
+ /*
+ * multipaths block handlers
+ */
+@@ -2358,6 +2408,19 @@ snprint_hw_retain_hwhandler_handler(char
+ }
+
+ static int
++snprint_detect_prio(char * buff, int len, void * data)
++{
++ struct hwentry * hwe = (struct hwentry *)data;
++
++ if (hwe->detect_prio == DETECT_PRIO_ON)
++ return snprintf(buff, len, "yes");
++ else if (hwe->detect_prio == DETECT_PRIO_OFF)
++ return snprintf(buff, len, "no");
++ else
++ return 0;
++}
++
++static int
+ snprint_def_polling_interval (char * buff, int len, void * data)
+ {
+ return snprintf(buff, len, "%i", conf->checkint);
+@@ -2704,6 +2767,15 @@ snprint_def_retain_hwhandler_handler(cha
+ }
+
+ static int
++snprint_def_detect_prio(char * buff, int len, void * data)
++{
++ if (conf->detect_prio == DETECT_PRIO_ON)
++ return snprintf(buff, len, "yes");
++ else
++ return snprintf(buff, len, "no");
++}
++
++static int
+ snprint_ble_simple (char * buff, int len, void * data)
+ {
+ struct blentry * ble = (struct blentry *)data;
+@@ -2769,6 +2841,7 @@ init_keywords(void)
+ install_keyword("reservation_key", &def_reservation_key_handler, &snprint_def_reservation_key);
+ install_keyword("find_multipaths", &def_find_multipaths_handler, &snprint_def_find_multipaths);
+ install_keyword("retain_attached_hw_handler", &def_retain_hwhandler_handler, &snprint_def_retain_hwhandler_handler);
++ install_keyword("detect_prio", &def_detect_prio_handler, &snprint_def_detect_prio);
+ __deprecated install_keyword("default_selector", &def_selector_handler, NULL);
+ __deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
+ __deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL);
+@@ -2831,6 +2904,7 @@ init_keywords(void)
+ install_keyword("dev_loss_tmo", &hw_dev_loss_handler, &snprint_hw_dev_loss);
+ install_keyword("user_friendly_names", &hw_names_handler, &snprint_hw_user_friendly_names);
+ install_keyword("retain_attached_hw_handler", &hw_retain_hwhandler_handler, &snprint_hw_retain_hwhandler_handler);
++ install_keyword("detect_prio", &hw_detect_prio_handler, &snprint_detect_prio);
+ install_sublevel_end();
+
+ install_keyword_root("multipaths", &multipaths_handler);
+Index: multipath-tools-120821/libmultipath/structs.h
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/structs.h
++++ multipath-tools-120821/libmultipath/structs.h
+@@ -105,6 +105,12 @@ enum retain_hwhandler_states {
+ RETAIN_HWHANDLER_ON,
+ };
+
++enum detect_prio_states {
++ DETECT_PRIO_UNDEF,
++ DETECT_PRIO_OFF,
++ DETECT_PRIO_ON,
++};
++
+ struct scsi_idlun {
+ int dev_id;
+ int host_unique_id;
+@@ -162,6 +168,7 @@ struct path {
+ int failcount;
+ int priority;
+ int pgindex;
++ int detect_prio;
+ char * uid_attribute;
+ struct prio * prio;
+ struct checker checker;
+Index: multipath-tools-120821/libmultipath/propsel.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/propsel.c
++++ multipath-tools-120821/libmultipath/propsel.c
+@@ -17,6 +17,7 @@
+ #include "devmapper.h"
+ #include "prio.h"
+ #include "discovery.h"
++#include "prioritizers/alua_rtpg.h"
+ #include <inttypes.h>
+
+ pgpolicyfn *pgpolicies[] = {
+@@ -379,11 +380,33 @@ select_getuid (struct path * pp)
+ return 0;
+ }
+
++struct prio *
++detect_prio(struct path * pp)
++{
++ struct prio *prio;
++
++ if (get_target_port_group_support(pp->fd) > 0) {
++ prio = prio_lookup(PRIO_ALUA);
++ prio_set_args(prio, DEFAULT_PRIO_ARGS);
++ return prio;
++ }
++ return NULL;
++}
++
+ extern int
+ select_prio (struct path * pp)
+ {
+ struct mpentry * mpe;
+
++ if (pp->detect_prio == DETECT_PRIO_ON) {
++ pp->prio = detect_prio(pp);
++ if (pp->prio) {
++ condlog(3, "%s: prio = %s (detected setting)",
++ pp->dev, pp->prio->name);
++ return 0;
++ }
++ }
++
+ if ((mpe = find_mpe(pp->wwid))) {
+ if (mpe->prio_name) {
+ pp->prio = prio_lookup(mpe->prio_name);
+@@ -701,3 +724,21 @@ select_retain_hwhandler (struct multipat
+ condlog(3, "%s: retain_attached_hw_handler = %d (compiled in default)", mp->alias, mp->retain_hwhandler);
+ return 0;
+ }
++
++extern int
++select_detect_prio (struct path * pp)
++{
++ if (pp->hwe && pp->hwe->detect_prio) {
++ pp->detect_prio = pp->hwe->detect_prio;
++ condlog(3, "%s: detect_prio = %d (controller default)", pp->dev, pp->detect_prio);
++ return 0;
++ }
++ if (conf->detect_prio) {
++ pp->detect_prio = conf->detect_prio;
++ condlog(3, "%s: detect_prio = %d (config file default)", pp->dev, pp->detect_prio);
++ return 0;
++ }
++ pp->detect_prio = 0;
++ condlog(3, "%s: detect_prio = %d (compiled in default)", pp->dev, pp->detect_prio);
++ return 0;
++}
+Index: multipath-tools-120821/libmultipath/Makefile
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/Makefile
++++ multipath-tools-120821/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 file.o wwids.o
++ lock.o waiter.o file.o wwids.o prioritizers/alua_rtpg.o
+
+ LIBDM_API_FLUSH = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_no_flush' /usr/include/libdevmapper.h)
+
+Index: multipath-tools-120821/libmultipath/discovery.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/discovery.c
++++ multipath-tools-120821/libmultipath/discovery.c
+@@ -778,6 +778,7 @@ get_prio (struct path * pp)
+ return 0;
+
+ if (!pp->prio) {
++ select_detect_prio(pp);
+ select_prio(pp);
+ if (!pp->prio) {
+ condlog(3, "%s: no prio selected", pp->dev);
+Index: multipath-tools-120821/libmultipath/propsel.h
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/propsel.h
++++ multipath-tools-120821/libmultipath/propsel.h
+@@ -19,3 +19,4 @@ int select_fast_io_fail(struct multipath
+ int select_dev_loss(struct multipath *mp);
+ int select_reservation_key(struct multipath *mp);
+ int select_retain_hwhandler (struct multipath * mp);
++int select_detect_prio(struct path * pp);
diff --git a/0020-RH-netapp-config.patch b/0020-RH-netapp-config.patch
new file mode 100644
index 0000000..831ff7f
--- /dev/null
+++ b/0020-RH-netapp-config.patch
@@ -0,0 +1,21 @@
+---
+ libmultipath/hwtable.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+Index: multipath-tools-120821/libmultipath/hwtable.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/hwtable.c
++++ multipath-tools-120821/libmultipath/hwtable.c
+@@ -871,9 +871,12 @@ static struct hwentry default_hw[] = {
+ .rr_weight = RR_WEIGHT_NONE,
+ .no_path_retry = NO_PATH_RETRY_UNDEF,
+ .minio = 128,
++ .dev_loss = MAX_DEV_LOSS_TMO,
+ .checker_name = TUR,
+ .prio_name = PRIO_ONTAP,
+ .prio_args = NULL,
++ .retain_hwhandler = RETAIN_HWHANDLER_ON,
++ .detect_prio = DETECT_PRIO_ON,
+ },
+ /*
+ * NEXENTA/COMSTAR controller family
diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec
index f3c1078..1881795 100644
--- a/device-mapper-multipath.spec
+++ b/device-mapper-multipath.spec
@@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath
Version: 0.4.9
-Release: 32%{?dist}
+Release: 33%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
@@ -24,8 +24,10 @@ Patch0013: 0013-RH-kpartx-msg.patch
Patch0014: 0014-RH-dm_reassign.patch
Patch0015: 0015-RH-selector_change.patch
Patch0016: 0016-RH-retain_hwhandler.patch
-Patch0017: 0017-RH-netapp_config.patch
+# Patch0017: 0017-RH-netapp_config.patch
Patch0018: 0018-RH-remove-config-dups.patch
+Patch0019: 0019-RH-detect-prio.patch
+Patch0020: 0020-RH-netapp-config.patch
# runtime
Requires: %{name}-libs = %{version}-%{release}
@@ -94,8 +96,10 @@ kpartx manages partition creation and removal for device-mapper devices.
%patch0014 -p1
%patch0015 -p1
%patch0016 -p1
-%patch0017 -p1
+# %patch0017 -p1
%patch0018 -p1
+%patch0019 -p1
+%patch0020 -p1
cp %{SOURCE1} .
%build
@@ -182,6 +186,18 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
%{_mandir}/man8/kpartx.8.gz
%changelog
+* Wed Oct 23 2012 Benjamin Marzinski <bmarizns@redhat.com> 0.4.9-33
+- Modify 0016-RH-retain_hwhandler.patch
+ * Check the dm-multipath module version, and don't enable
+ retain_attached_hw_handler if the kernel doesn't support it
+- Add 0019-RH-detect-prio.patch
+ * add detect_prio option, to make multipath check if the device
+ supports the ALUA prio, before defaulting to the configured prio
+- Remove 0017-RH-netapp_config.patch
+- Add 0020-RH-netapp-config.patch
+ * new netapp config that uses retain_attached_hw_handler and
+ detect_prio to autoconfigure ALUA and non-ALUA devices.
+
* Tue Oct 2 2012 Benjamin Marzinski <bmarizns@redhat.com> 0.4.9-32
- Modified 0018-RH-remove-config-dups.patch
* Made modified config remove original only if the vendor/product