device-mapper-multipath/0144-RHBZ-1299652-alua-pref-arg.patch
Benjamin Marzinski 6738b34a0b device-mapper-multipath-0.4.9-82
- Modify 0005-RH-add-mpathconf.patch
  * changed warning message
- Modify 0102-RHBZ-1160478-mpathconf-template.patch
  * updated man page
- Modify 0104-RHBZ-631009-deferred-remove.patch
  * refactor code and minor fix
- Refresh 0107-RHBZ-1169935-no-new-devs.patch
- Refresh 0112-RHBZ-1194917-add-config_dir-option.patch
- Refresh 0126-RHBZ-1211383-alias-collision.patch
- Add 0133-RHBZ-1296979-fix-define.patch
  * look for the correct libudev function to set define
- Add 0134-RHBZ-1241528-check-mpath-prefix.patch
  * only touch devices with a "mpath-" dm uuid prefix
- Add 0135-RHBZ-1299600-path-dev-uevents.patch
  * trigger path uevent the first time a path is claimed by multipath
- Add 0136-RHBZ-1304687-wait-for-map-add.patch
  * wait for the device to finish being added before reloading it.
- Add 0137-RHBZ-1280524-clear-chkr-msg.patch
- Add 0138-RHBZ-1288660-fix-mpathconf-allow.patch
  * don't remove existing lines from blacklist_exceptions section
- Add 0139-RHBZ-1273173-queue-no-daemon-doc.patch
- Add 0140-RHBZ-1299647-fix-help.patch
- Add 0141-RHBZ-1303953-mpathpersist-typo.patch
- Add 0142-RHBZ-1283750-kpartx-fix.patch
  * only remove devices if their uuid says that they are the correct
    partition device
- Add 0143-RHBZ-1299648-kpartx-sync.patch
  * default to using udev sync mode
- Add 0144-RHBZ-1299652-alua-pref-arg.patch
  * allow "exclusive_pref_bit" argument to alua prioritizer
- Add 0145-UP-resize-help-msg.patch
- Add 0146-UPBZ-1299651-raw-output.patch
  * allow raw format mutipathd show commands, that remove headers and padding
- Add 0147-RHBZ-1272620-fail-rm-msg.patch
- Add 0148-RHBZ-1292599-verify-before-remove.patch
  * verify that all partitions are unused before attempting to remove a device
- Add 0149-RHBZ-1292599-restore-removed-parts.patch
  * don't disable kpartx when restoring the first path of a device.
- Add 0150-RHBZ-1253913-fix-startup-msg.patch
  * wait for multipathd daemon to write pidfile before returning
- Add 0151-RHBZ-1297456-weighted-fix.patch
  * add wwn keyword to weighted prioritizer for persistent naming
- Add 0152-RHBZ-1269293-fix-blk-unit-file.patch
  * use "Wants" instead of "Requires"
- Add 0153-RH-fix-i686-size-bug.patch
  * use 64-bit keycodes for multipathd client commands
- Add 0154-UPBZ-1291406-disable-reinstate.patch
  * don't automatically reinstate ghost paths for implicit alua devices
- Add 0155-UPBZ-1300415-PURE-config.patch
  * Add default config for PURE FlashArray
- Add 0156-UPBZ-1313324-dont-fail-discovery.patch
  * don't fail discovery because individual paths failed.
- Add 0157-RHBZ-1319853-multipath-c-error-msg.patch
  * better error reporting for multipath -c
- Add 0158-RHBZ-1318581-timestamp-doc-fix.patch
  * add documentation for -T
- Add 0159-UPBZ-1255885-udev-waits.patch
  * make multipath and kpartx wait after for udev after each command
2016-04-21 21:27:49 -05:00

137 lines
4.0 KiB
Diff

---
libmultipath/prioritizers/alua.c | 20 +++++++++++++++++++-
libmultipath/propsel.c | 18 ++++++++++--------
multipath/multipath.conf.5 | 19 ++++++++++++++++---
3 files changed, 45 insertions(+), 12 deletions(-)
Index: multipath-tools-130222/libmultipath/prioritizers/alua.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/prioritizers/alua.c
+++ multipath-tools-130222/libmultipath/prioritizers/alua.c
@@ -86,15 +86,33 @@ get_alua_info(int fd, struct alua_contex
return rc;
}
+int get_exclusive_perf_arg(char *args)
+{
+ char *ptr;
+
+ if (args == NULL)
+ return 0;
+ ptr = strstr(args, "exclusive_pref_bit");
+ if (!ptr)
+ return 0;
+ if (ptr[18] != '\0' && ptr[18] != ' ' && ptr[18] != '\t')
+ return 0;
+ if (ptr != args && ptr[-1] != ' ' && ptr[-1] != '\t')
+ return 0;
+ return 1;
+}
+
int getprio (struct path * pp, char * args)
{
int rc;
int aas;
int priopath;
+ int exclusive_perf;
if (pp->fd < 0)
return -ALUA_PRIO_NO_INFORMATION;
+ exclusive_perf = get_exclusive_perf_arg(args);
rc = get_alua_info(pp->fd, pp->prio.context);
if (rc >= 0) {
aas = (rc & 0x0f);
@@ -115,7 +133,7 @@ int getprio (struct path * pp, char * ar
default:
rc = 0;
}
- if (priopath && aas != AAS_OPTIMIZED)
+ if (priopath && (aas != AAS_OPTIMIZED || exclusive_perf))
rc += 80;
} else {
switch(-rc) {
Index: multipath-tools-130222/libmultipath/propsel.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/propsel.c
+++ multipath-tools-130222/libmultipath/propsel.c
@@ -420,17 +420,19 @@ select_prio (struct path * pp)
if (prio_selected(p)) {
condlog(3, "%s: prio = %s (detected setting)",
pp->dev, prio_name(p));
+ condlog(3, "%s: prio args = %s (detected setting)",
+ pp->dev, prio_args(p));
return 0;
}
}
- if ((mpe = find_mpe(pp->wwid))) {
- if (mpe->prio_name) {
- prio_get(p, mpe->prio_name, mpe->prio_args);
- condlog(3, "%s: prio = %s (LUN setting)",
- pp->dev, prio_name(p));
- return 0;
- }
+ if ((mpe = find_mpe(pp->wwid)) && mpe->prio_name) {
+ prio_get(p, mpe->prio_name, mpe->prio_args);
+ condlog(3, "%s: prio = %s (LUN setting)",
+ pp->dev, prio_name(p));
+ condlog(3, "%s: prio args = %s (LUN setting)",
+ pp->dev, prio_args(p));
+ return 0;
}
if (pp->hwe && pp->hwe->prio_name) {
@@ -452,7 +454,7 @@ select_prio (struct path * pp)
prio_get(p, DEFAULT_PRIO, DEFAULT_PRIO_ARGS);
condlog(3, "%s: prio = %s (internal default)",
pp->dev, DEFAULT_PRIO);
- condlog(3, "%s: prio = %s (internal default)",
+ condlog(3, "%s: prio args = %s (internal default)",
pp->dev, DEFAULT_PRIO_ARGS);
return 0;
}
Index: multipath-tools-130222/multipath/multipath.conf.5
===================================================================
--- multipath-tools-130222.orig/multipath/multipath.conf.5
+++ multipath-tools-130222/multipath/multipath.conf.5
@@ -182,7 +182,9 @@ Return a constant priority of \fI1\fR.
Generate the path priority for EMC arrays.
.TP
.B alua
-Generate the path priority based on the SCSI-3 ALUA settings.
+Generate the path priority based on the SCSI-3 ALUA settings. This prioritizer
+accepts the optional prio_arg
+.I exclusive_pref_bit
.TP
.B ontap
Generate the path priority for NetApp arrays.
@@ -208,14 +210,25 @@ Default value is \fBconst\fR.
.RE
.TP
.B prio_args
-Arguments to pass to to the prio function. Currently only used with
-.I weighted, which needs a value of the form
+Arguments to pass to to the prio function. This only applies to certain
+prioritizers
+.RS
+.TP 12
+.B weighted
+Needs a value of the form
.I "<hbtl|devname> <regex1> <prio1> <regex2> <prio2> ..."
.I hbtl
regex can be of SCSI H:B:T:L format Ex: 1:0:.:. , *:0:0:.
.I devname
regex can be of device name format Ex: sda , sd.e
.TP
+.B alua
+If
+.I exclusive_pref_bit
+is set, paths with the TPGS pref bit set will always be in their own path
+group.
+.RE
+.TP
.B features
Specify any device-mapper features to be used. Syntax is
.I num list