diff mbox

multipath-tools: select reservation_key parameter before PR handler for first path addition to new map

Message ID D2EBB4B4.75AF%Shiva.Krishna@nimblestorage.com (mailing list archive)
State New, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Shiva Krishna Feb. 19, 2016, 1:49 a.m. UTC
On addition of first path, reservation_key parameter is not selected before
handling persistent reservations. This leads multipathd to not perform
registration on the path even when registrations exist on the LUN.

Added code to select "reservation_key" parameter value before calling
PR handler during addition of new path to a new map.

Signed-off-by: ShivaKrishna Merla <shiva.krishna@nimblestorage.com>
---
 libmultipath/configure.c |    5 ++++-
 multipathd/main.c        |    2 ++
 2 files changed, 6 insertions(+), 1 deletions(-)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 24ad948..2071aa4 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -287,7 +287,10 @@  setup_map (struct multipath * mpp, char * params, int params_size)
  select_gid(mpp);
  select_fast_io_fail(mpp);
  select_dev_loss(mpp);
- select_reservation_key(mpp);
+
+ if (!mpp->reservation_key)
+ select_reservation_key(mpp);
+
  select_retain_hwhandler(mpp);
  select_deferred_remove(mpp);
  select_delay_watch_checks(mpp);
diff --git a/multipathd/main.c b/multipathd/main.c
index 04f6d02..bf3423f 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -539,6 +539,8 @@  rescan:
  goto fail; /* leave path added to pathvec */
  }

+ /* select configured reservation key */
+ select_reservation_key(mpp);
  /* persistent reseravtion check*/
  mpath_pr_event_handle(pp);
--