Message ID | 1512672546-12785-4-git-send-email-bmarzins@redhat.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote: > 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@redhat.com> Reviewed-by: Martin Wilck <mwilck@suse.com>
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)))) {
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@redhat.com> --- libmultipath/configure.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)