device-mapper-multipath/0019-libmultipath-fix-detect-alua-corner-case.patch
Benjamin Marzinski 64b1cb0e21 device-mapper-multipath-0.7.7-1
Update Source to 0.7.7
  * Previous patches 0001-0009 & 0018 are included in this commit
Add upstream patches since 0.7.7
  * patches 0001-0012 are from upstream commits since 0.7.7
Add 0015-mpathpersist-add-all_tg_pt-option.patch
  * add new all_tg_pt multpiath.conf option. posted upstream
Add 0016-libmultipath-remove-rbd-code.patch
  * remove unused rbd code. posted upstream
Add 0017-mpathpersist-fix-aptpl-support.patch
  * add ":aptpl" suffix for reservation_key to fix aptpl support.
    posted upstream
Add 0018-multipath-don-t-check-timestamps-without-a-path.patch
  * fix multipath null dereference crash. posted upstream
Add 0019-libmultipath-fix-detect-alua-corner-case.patch
  * fix alua detection with retain_hardware_handler set to off. posted
    upstream
Add 0020-multipath-fix-setting-conf-version.patch
  * multipath wasn't setting the kernel version correctly. posted
    upstream
Add 0028-RH-reset-default-find_mutipaths-value-to-off.patch
  * default to RHEL7 and older device detection style. Redhat specific,
    to keep customer experience the same.
Rename files
  * Previous patches 0010-0011 are now patches 0013-0014
  * Previous patches 0012-0017 & 0019 are now patches 0021-0027
Modify 0021-RH-fixup-udev-rules-for-redhat.patch
  * Fix spurious compile warning with redhat compile options
2018-06-12 14:11:55 -05:00

36 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Fri, 8 Jun 2018 17:12:37 -0500
Subject: [PATCH] libmultipath: fix detect alua corner case
If retain_attach_hw_handler = no, then the paths tpgs state will never
be checked, and the multipath device will always select the alua
handler, if no other handler is selected. the paths tpgs state
should be checked, regardless of the retain_hwhandler value.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/propsel.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
index 62a6893..f626c74 100644
--- a/libmultipath/propsel.c
+++ b/libmultipath/propsel.c
@@ -403,9 +403,11 @@ int select_hwhandler(struct config *conf, struct multipath *mp)
bool all_tpgs = true;
dh_state = &handler[2];
+
+ vector_foreach_slot(mp->paths, pp, i)
+ all_tpgs = all_tpgs && (pp->tpgs > 0);
if (mp->retain_hwhandler != RETAIN_HWHANDLER_OFF) {
vector_foreach_slot(mp->paths, pp, i) {
- all_tpgs = all_tpgs && (pp->tpgs > 0);
if (get_dh_state(pp, dh_state, sizeof(handler) - 2) > 0
&& strcmp(dh_state, "detached")) {
memcpy(handler, "1 ", 2);
--
2.7.4