[dm-devel] [PATCH 03/12] multipath: fix hwhandler check in select_action
Benjamin Marzinski
bmarzins at redhat.com
Thu Dec 7 18:48:57 UTC 2017
If the existing multipath table does not have a hardware handler set,
then even if retain_hwhandler is enabled on the new table, it may still
be possible to set the hardware handler on reload. So, adding a
hardware handler to the table should trigger a reload in this case.
Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
---
libmultipath/configure.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 09cbe3c..0dfa250 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -563,7 +563,8 @@ select_action (struct multipath * mpp, vector curmp, int force_reload)
mpp->alias);
return;
}
- if (mpp->retain_hwhandler != RETAIN_HWHANDLER_ON &&
+ if ((mpp->retain_hwhandler != RETAIN_HWHANDLER_ON ||
+ strcmp(cmpp->hwhandler, "0") == 0) &&
(strlen(cmpp->hwhandler) != strlen(mpp->hwhandler) ||
strncmp(cmpp->hwhandler, mpp->hwhandler,
strlen(mpp->hwhandler)))) {
--
2.7.4
More information about the dm-devel
mailing list