device-mapper-multipath/0001-mpathpersist-Fix-invalid-condition-check.patch
Benjamin Marzinski 542c8d8bff device-mapper-multipath-0.7.3-1
Update Source to upstream 0.7.3 release
  * Previous patch 0001 is included in this commit, and 0002 was solved
    in a different manner causing some change to previous patch 0003
  * Previous patches 0003-0010 are now patches 0007-0014
Add 0001-mpathpersist-Fix-invalid-condition-check.patch
  * Fix incorrect check. posted upstream
Add 0002-multipath-add-man-page-info-for-my-prkey-changes.patch
  * Add missing man page info. posted upstream
Add 0003-multipath-there-is-no-none-path-state.patch
  * remove incorrect path state. posted upstream
Add 0004-mutipath-updated-Huawei-storage-config.patch
  * update builtin device configuration. posted upstream
Add 0005-multipath-fix-doc-typo.patch
  * fix man page typo. posted upstream
Add 0006-multipath-add-ghost_delay-parameter.patch
  * add new multipath.conf parameter "ghost_delay". posted upstream
2017-11-07 17:51:09 -06:00

36 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Wed, 6 Sep 2017 16:27:36 -0500
Subject: [PATCH] mpathpersist: Fix invalid condition check
In commit 1990257c (mpathpersist: add support for prkeys file), the
check to see if mpathpersist needed to tell multipathd to update a
device's prkey was wrong. It had a typo that made it evaluate to true
for any service action, instead of just for registrations. This is the
correct check.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmpathpersist/mpath_persist.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
index b5ed556..84ab293 100644
--- a/libmpathpersist/mpath_persist.c
+++ b/libmpathpersist/mpath_persist.c
@@ -339,8 +339,9 @@ int mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,
memcpy(&prkey, paramp->sa_key, 8);
if (mpp->prkey_source == PRKEY_SOURCE_FILE && prkey &&
- ((!get_be64(mpp->reservation_key) && MPATH_PROUT_REG_SA) ||
- MPATH_PROUT_REG_IGN_SA)) {
+ ((!get_be64(mpp->reservation_key) &&
+ rq_servact == MPATH_PROUT_REG_SA) ||
+ rq_servact == MPATH_PROUT_REG_IGN_SA)) {
memcpy(&mpp->reservation_key, paramp->sa_key, 8);
if (update_prkey(alias, get_be64(mpp->reservation_key))) {
condlog(0, "%s: failed to set prkey for multipathd.",
--
2.7.4